Browse Source

linux implementation of juce_areThereAnyAlwaysOnTopWindows()

tags/2021-05-28
jules 13 years ago
parent
commit
36ade1a49b
1 changed files with 17 additions and 7 deletions
  1. +17
    -7
      modules/juce_gui_basics/native/juce_linux_Windowing.cpp

+ 17
- 7
modules/juce_gui_basics/native/juce_linux_Windowing.cpp 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
{


Loading…
Cancel
Save