Просмотр исходного кода

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 9 лет назад
Родитель
Сommit
6fed4ff892
1 измененных файлов с 3 добавлено и 0 удалено
  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);