]> git.sesse.net Git - vlc/commitdiff
Restore cursor when closing vout since the window doesn't belong to us
authorGildas Bazin <gbazin@videolan.org>
Mon, 8 Feb 2010 08:33:26 +0000 (08:33 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 8 Feb 2010 18:09:21 +0000 (18:09 +0000)
modules/video_output/xcb/glx.c
modules/video_output/xcb/x11.c
modules/video_output/xcb/xvideo.c

index 879335ffadb0d91f917c170ce87d949c14d41bc6..cbb1fe56b37aee6fd7f4c7fd78bf9d1017c56efd 100644 (file)
@@ -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);
index b4641f426774164426a6c53360d19e3a072c180e..3255aabd7785353e7a1e2577f414639c6f8e3b2f 100644 (file)
@@ -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);
index 0c479bb8c0675e96390d89f0d9a42df2932dde2a..194837c548ec804a8ab714a6806f5a2dfeb53cdd 100644 (file)
@@ -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);