1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-24 01:54:22 +00:00

linux implementation of juce_areThereAnyAlwaysOnTopWindows()

This commit is contained in:
jules 2013-03-26 13:30:26 +00:00
parent 417f4ffe53
commit 36ade1a49b

View file

@ -792,6 +792,14 @@ static void* createDraggingHandCursor()
return CustomMouseCursorInfo (ImageFileFormat::loadFrom (dragHandData, dragHandDataSize), 8, 7).create();
}
//==============================================================================
static int numAlwaysOnTopPeers = 0;
bool juce_areThereAnyAlwaysOnTopWindows()
{
return numAlwaysOnTopPeers > 0;
}
//==============================================================================
class LinuxComponentPeer : public ComponentPeer
{
@ -800,7 +808,8 @@ public:
: ComponentPeer (comp, windowStyleFlags),
windowH (0), parentWindow (0),
fullScreen (false), mapped (false),
visual (nullptr), depth (0)
visual (nullptr), depth (0),
isAlwaysOnTop (comp.isAlwaysOnTop())
{
// it's dangerous to create a window on a thread other than the message thread..
jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager());
@ -808,6 +817,9 @@ public:
dispatchWindowMessage = windowMessageReceive;
repainter = new LinuxRepaintManager (*this);
if (isAlwaysOnTop)
++numAlwaysOnTopPeers;
createWindow (parentToAddTo);
setTitle (component.getName());
@ -821,6 +833,9 @@ public:
deleteIconPixmaps();
destroyWindow();
windowH = 0;
if (isAlwaysOnTop)
--numAlwaysOnTopPeers;
}
// (this callback is hooked up in the messaging code)
@ -1915,6 +1930,7 @@ private:
Visual* visual;
int depth;
BorderSize<int> windowBorder;
bool isAlwaysOnTop;
enum { KeyPressEventType = 2 };
struct MotifWmHints
@ -3139,12 +3155,6 @@ bool Desktop::isScreenSaverEnabled()
return screenSaverAllowed;
}
//==============================================================================
bool juce_areThereAnyAlwaysOnTopWindows()
{
return false; // XXX should be implemented
}
//==============================================================================
void* CustomMouseCursorInfo::create() const
{