diff options
author | Nils Schneider <nils@nilsschneider.net> | 2016-01-20 20:06:46 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-20 20:28:16 +0100 |
commit | c406f83d375718c7b2798a08a7225df4a915292e (patch) | |
tree | 8a111f6cc807b6e4635ed71c18d4e8d5f2c66d6e /video/out/x11_common.c | |
parent | 68366b05f283d8f12f5602c74954e2ec986b2f50 (diff) | |
download | mpv-c406f83d375718c7b2798a08a7225df4a915292e.tar.bz2 mpv-c406f83d375718c7b2798a08a7225df4a915292e.tar.xz |
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>
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 4c7237dd82..5c53ed4c34 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -364,7 +364,7 @@ static void xrandr_read(struct vo_x11_state *x11) RRCrtcChangeNotifyMask | RROutputChangeNotifyMask); } - XRRScreenResources *r = XRRGetScreenResources(x11->display, x11->rootwin); + XRRScreenResources *r = XRRGetScreenResourcesCurrent(x11->display, x11->rootwin); if (!r) { MP_VERBOSE(x11, "Xrandr doesn't work.\n"); return; |