]> git.sesse.net Git - vlc/blobdiff - modules/video_output/xcb/glx.c
XCB: reset the X11 screen saver when displaying a picture
[vlc] / modules / video_output / xcb / glx.c
index 0e88a946a1e64969c5649f92dd5eb08a4d83991c..42ff5cf111a5de4fc69343c73b7d5b14f186c820 100644 (file)
@@ -55,7 +55,7 @@ vlc_module_begin ()
     set_capability ("vout display", 50)
     set_callbacks (Open, Close)
 
-    add_shortcut ("xcb-glx", "glx", "opengl")
+    add_shortcut ("xcb-glx", "glx", "opengl", "xid")
 vlc_module_end ()
 
 struct vout_display_sys_t
@@ -458,7 +458,7 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
 
 static void PictureRender (vout_display_t *vd, picture_t *pic)
 {
-   vout_display_sys_t *sys = vd->sys;
+    vout_display_sys_t *sys = vd->sys;
 
     vout_display_opengl_Prepare (&sys->vgl, pic);
 }
@@ -466,8 +466,11 @@ static void PictureRender (vout_display_t *vd, picture_t *pic)
 static void PictureDisplay (vout_display_t *vd, picture_t *pic)
 {
     vout_display_sys_t *sys = vd->sys;
+    xcb_connection_t *conn = XGetXCBConnection (sys->display);
 
+    xcb_force_screen_saver (conn, XCB_SCREEN_SAVER_RESET);
     vout_display_opengl_Display (&sys->vgl, &vd->source);
+    xcb_flush (conn);
     picture_Release (pic);
 }