Browse Source

Linux: Added a check for non-existent Atom in findDisplays()

tags/2021-05-28
ed 6 years ago
parent
commit
32d11dd756
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp

+ 6
- 3
modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp View File

@@ -3442,10 +3442,13 @@ void Displays::findDisplays (float masterScale)
auto getWorkAreaPropertyData = [&] (int screenNum) -> unsigned char*
{
GetXProperty prop (display, RootWindow (display, screenNum), hints, 0, 4, false, XA_CARDINAL);
if (hints != None)
{
GetXProperty prop (display, RootWindow (display, screenNum), hints, 0, 4, false, XA_CARDINAL);
if (prop.success && prop.actualType == XA_CARDINAL && prop.actualFormat == 32 && prop.numItems == 4)
return prop.data;
if (prop.success && prop.actualType == XA_CARDINAL && prop.actualFormat == 32 && prop.numItems == 4)
return prop.data;
}
return nullptr;
};


Loading…
Cancel
Save