mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
x11: get *current* XRandR screen configuration
Only request the current screen configuration instead of polling for new screens, too. We're not interested in detecting any new screens as we're merely enumerating what is currently connected and configured. On some hardware (like mine) calling XRRGetScreenResources will stall X11 for about 10 to 20 seconds. This has annoyed me for a few months now and almost made me switch to VLC ;) Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
68366b05f2
commit
c406f83d37
@ -364,7 +364,7 @@ static void xrandr_read(struct vo_x11_state *x11)
|
|||||||
RRCrtcChangeNotifyMask | RROutputChangeNotifyMask);
|
RRCrtcChangeNotifyMask | RROutputChangeNotifyMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
XRRScreenResources *r = XRRGetScreenResources(x11->display, x11->rootwin);
|
XRRScreenResources *r = XRRGetScreenResourcesCurrent(x11->display, x11->rootwin);
|
||||||
if (!r) {
|
if (!r) {
|
||||||
MP_VERBOSE(x11, "Xrandr doesn't work.\n");
|
MP_VERBOSE(x11, "Xrandr doesn't work.\n");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user