1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

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

This commit is contained in:
ed 2019-05-20 17:45:38 +01:00
parent 4ff0c9c881
commit 32d11dd756

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;
};