Quellcode durchsuchen

DisplayManagerX11: always pretend success when switching modes

The return value isn't always accurate, apparently. There is a user
report where it appears to return failure, but switching happened
anyway. To make it worse, the return value of XRRSetCrtcConfig() is not
documented anywhere on this earth (though implied to be a boolean by the
"Status" type), so it's not sure whether it even returns success.

Mitigation for #247.
Vincent Lang vor 9 Jahren
Ursprung
Commit
6fed4ff892
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      src/display/x11/DisplayManagerX11.cpp

+ 3 - 0
src/display/x11/DisplayManagerX11.cpp

@@ -104,6 +104,9 @@ bool DisplayManagerX11::setDisplayMode(int display, int mode)
                              crtc->x, crtc->y, xrmode, crtc->rotation,
                              crtc->outputs, crtc->noutput);
 
+  // The return value isn't always accurate, apparently.
+  success = true;
+
 done:
   if (crtc)
     XRRFreeCrtcInfo(crtc);