[vlc-commits] commit: XCB: reset the X11 screen saver when displaying a picture ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Mon Aug 23 20:46:31 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 11 13:59:29 2010 +0300| [48be35499d7545a31a160c7578ffa073f761e814] | committer: Rémi Denis-Courmont 

XCB: reset the X11 screen saver when displaying a picture

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48be35499d7545a31a160c7578ffa073f761e814
---

 modules/video_output/xcb/glx.c    |    3 +++
 modules/video_output/xcb/x11.c    |    2 ++
 modules/video_output/xcb/xvideo.c |    2 ++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/xcb/glx.c b/modules/video_output/xcb/glx.c
index 6aa8976..42ff5cf 100644
--- a/modules/video_output/xcb/glx.c
+++ b/modules/video_output/xcb/glx.c
@@ -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);
 }
 
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index ef9ba5e..51963dd 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -433,6 +433,8 @@ static void Display (vout_display_t *vd, picture_t *pic)
 
     if (!p_sys->visible)
         goto out;
+    xcb_force_screen_saver (p_sys->conn, XCB_SCREEN_SAVER_RESET);
+
     if (segment != 0)
         ck = xcb_shm_put_image_checked (p_sys->conn, p_sys->window, p_sys->gc,
           /* real width */ pic->p->i_pitch / pic->p->i_pixel_pitch,
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 90097db..9a0ce12 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -685,6 +685,8 @@ static void Display (vout_display_t *vd, picture_t *pic)
 
     if (!p_sys->visible)
         goto out;
+    xcb_force_screen_saver (p_sys->conn, XCB_SCREEN_SAVER_RESET);
+
     if (segment)
         ck = xcb_xv_shm_put_image_checked (p_sys->conn, p_sys->port,
                               p_sys->window, p_sys->gc, segment, p_sys->id, 0,



More information about the vlc-commits mailing list