XRandR: fixed primary output detection logic (thanks, "winterknight"!).
Fixes Bugzilla #3185.
parent
326b357804
commit
18c7d6df21
|
@ -376,8 +376,7 @@ X11_InitModes_XRandR(_THIS)
|
||||||
for (screen = 0; screen < screencount; screen++) {
|
for (screen = 0; screen < screencount; screen++) {
|
||||||
|
|
||||||
/* we want the primary output first, and then skipped later. */
|
/* we want the primary output first, and then skipped later. */
|
||||||
if ((looking_for_primary && (screen != default_screen)) ||
|
if (looking_for_primary && (screen != default_screen)) {
|
||||||
(!looking_for_primary && (screen == default_screen))) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,7 +420,7 @@ X11_InitModes_XRandR(_THIS)
|
||||||
XRRCrtcInfo *crtc;
|
XRRCrtcInfo *crtc;
|
||||||
|
|
||||||
/* The primary output _should_ always be sorted first, but just in case... */
|
/* The primary output _should_ always be sorted first, but just in case... */
|
||||||
if ((looking_for_primary && ((screen != default_screen) || (res->outputs[output] != primary))) ||
|
if ((looking_for_primary && (res->outputs[output] != primary)) ||
|
||||||
(!looking_for_primary && (screen == default_screen) && (res->outputs[output] == primary))) {
|
(!looking_for_primary && (screen == default_screen) && (res->outputs[output] == primary))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue