[vlc-devel] commit: Restore cursor when closing vout since the window doesn' t belong to us (Gildas Bazin )
git version control
git at videolan.org
Mon Feb 8 19:11:14 CET 2010
vlc | branch: master | Gildas Bazin <gbazin at videolan.org> | Mon Feb 8 08:33:26 2010 +0000| [f4ebb1b3522281cd243e1a1f0b197af00fe22402] | committer: Gildas Bazin
Restore cursor when closing vout since the window doesn't belong to us
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f4ebb1b3522281cd243e1a1f0b197af00fe22402
---
modules/video_output/xcb/glx.c | 7 +++++++
modules/video_output/xcb/x11.c | 6 ++++++
modules/video_output/xcb/xvideo.c | 5 +++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/modules/video_output/xcb/glx.c b/modules/video_output/xcb/glx.c
index 879335f..cbb1fe5 100644
--- a/modules/video_output/xcb/glx.c
+++ b/modules/video_output/xcb/glx.c
@@ -417,6 +417,13 @@ static void Close (vlc_object_t *obj)
glXMakeCurrent (dpy, None, NULL);
glXDestroyContext (dpy, sys->ctx);
}
+
+ /* show the default cursor */
+ xcb_change_window_attributes (XGetXCBConnection (sys->display),
+ sys->embed->handle.xid, XCB_CW_CURSOR,
+ &(uint32_t) { XCB_CURSOR_NONE });
+ xcb_flush (XGetXCBConnection (sys->display));
+
XCloseDisplay (dpy);
vout_display_DeleteWindow (vd, sys->embed);
free (sys);
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index b4641f4..3255aab 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -310,6 +310,12 @@ static void Close (vlc_object_t *obj)
vout_display_sys_t *p_sys = vd->sys;
ResetPictures (vd);
+
+ /* show the default cursor */
+ xcb_change_window_attributes (p_sys->conn, p_sys->embed->handle.xid, XCB_CW_CURSOR,
+ &(uint32_t) { XCB_CURSOR_NONE });
+ xcb_flush (p_sys->conn);
+
/* colormap, window and context are garbage-collected by X */
xcb_disconnect (p_sys->conn);
vout_display_DeleteWindow (vd, p_sys->embed);
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 0c479bb..194837c 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -560,6 +560,11 @@ static void Close (vlc_object_t *obj)
picture_pool_Delete (p_sys->pool);
}
+ /* show the default cursor */
+ xcb_change_window_attributes (p_sys->conn, p_sys->embed->handle.xid, XCB_CW_CURSOR,
+ &(uint32_t) { XCB_CURSOR_NONE });
+ xcb_flush (p_sys->conn);
+
free (p_sys->att);
xcb_disconnect (p_sys->conn);
vout_display_DeleteWindow (vd, p_sys->embed);
More information about the vlc-devel
mailing list