summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
Diffstat (limited to 'video/out')
-rw-r--r--video/out/x11_common.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 5eb6031d66..ecafc4a324 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -496,9 +496,6 @@ int vo_x11_init(struct vo *vo)
fstype_dump(x11->fs_type);
- if (opts->stop_screensaver)
- saver_off(x11);
-
vo->event_fd = ConnectionNumber(x11->display);
return 1;
@@ -1371,6 +1368,7 @@ static void vo_x11_border(struct vo *vo)
int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
{
+ struct vo_x11_state *x11 = vo->x11;
switch (request) {
case VOCTRL_CHECK_EVENTS:
*events |= vo_x11_check_events(vo);
@@ -1392,6 +1390,12 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
case VOCTRL_SET_CURSOR_VISIBILITY:
vo_set_cursor_hidden(vo, !(*(bool *)arg));
return VO_TRUE;
+ case VOCTRL_KILL_SCREENSAVER:
+ saver_off(x11);
+ return VO_TRUE;
+ case VOCTRL_RESTORE_SCREENSAVER:
+ saver_on(x11);
+ return VO_TRUE;
}
return VO_NOTIMPL;
}