diff options
author | wm4 <wm4@nowhere> | 2017-08-08 12:55:41 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-08 12:55:41 +0200 |
commit | 3f75b3c3439241c209349908fa190c0382e44f05 (patch) | |
tree | b6e8b518e68df2f5e94b121e0fc2348e255036a7 /video/out/x11_common.c | |
parent | a434892208559232d108b512f9ed30527e646d9d (diff) | |
download | mpv-3f75b3c3439241c209349908fa190c0382e44f05.tar.bz2 mpv-3f75b3c3439241c209349908fa190c0382e44f05.tar.xz |
x11: drop xscrnsaver use
It's an ancient X11 protocol extension that apparently nobody uses
anymore (desktop environments in particular have replaced it with
equally bad protocols that require tons of dependencies). Users keep
complaining about it being a required dependency.
The impact is likely minimal to none.
Fixes #4706 and other annoying people.
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 30ad89746f..41c9d8b00a 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -33,7 +33,6 @@ #include <X11/XKBlib.h> #include <X11/XF86keysym.h> -#include <X11/extensions/scrnsaver.h> #include <X11/extensions/dpms.h> #include <X11/extensions/Xinerama.h> #include <X11/extensions/Xrandr.h> @@ -1908,22 +1907,9 @@ static void xscreensaver_heartbeat(struct vo_x11_state *x11) { x11->screensaver_time_last = time; sem_post(&x11->screensaver_sem); - XResetScreenSaver(x11->display); } } -static int xss_suspend(Display *mDisplay, Bool suspend) -{ - int event, error, major, minor; - if (XScreenSaverQueryExtension(mDisplay, &event, &error) != True || - XScreenSaverQueryVersion(mDisplay, &major, &minor) != True) - return 0; - if (major < 1 || (major == 1 && minor < 1)) - return 0; - XScreenSaverSuspend(mDisplay, suspend); - return 1; -} - static void set_screensaver(struct vo_x11_state *x11, bool enabled) { Display *mDisplay = x11->display; @@ -1931,8 +1917,6 @@ static void set_screensaver(struct vo_x11_state *x11, bool enabled) return; MP_VERBOSE(x11, "%s screensaver.\n", enabled ? "Enabling" : "Disabling"); x11->screensaver_enabled = enabled; - if (xss_suspend(mDisplay, !enabled)) - return; int nothing; if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing)) { BOOL onoff = 0; |