changeset 34031:83a80dedac69

Don't hide or show cursor if attached to an existing window. This gives the application owning the window the control of the cursor.
author ib
date Wed, 21 Sep 2011 13:15:04 +0000
parents 7880ad51d461
children afb361a00e1f
files Changelog libvo/x11_common.c
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Changelog	Wed Sep 21 09:53:12 2011 +0000
+++ b/Changelog	Wed Sep 21 13:15:04 2011 +0000
@@ -16,6 +16,7 @@
     * support adding noise at output resolution with -vo gl:noise-strength=8
     * experimental support for PGS (BluRay-compatible), DVB and XSUB subtitles.
     * experimental af_cmdline slave command to change e.g. audio equalizer options at runtime.
+    * vo x11: don't hide or show cursor any more if attached to an existing window (-wid)
 
     MEncoder:
     * -force-key-frames option to set explicit seek points.
--- a/libvo/x11_common.c	Wed Sep 21 09:53:12 2011 +0000
+++ b/libvo/x11_common.c	Wed Sep 21 13:15:04 2011 +0000
@@ -184,8 +184,8 @@
     Colormap colormap;
     static char bm_no_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
 
-    if (WinID == 0)
-        return;                 // do not hide if playing on the root window
+    if (WinID >= 0)
+        return;        // do not hide if attached to an existing window
 
     colormap = DefaultColormap(disp, DefaultScreen(disp));
     if ( !XAllocNamedColor(disp, colormap, "black", &black, &dummy) )
@@ -203,8 +203,8 @@
 
 static void vo_showcursor(Display * disp, Window win)
 {
-    if (WinID == 0)
-        return;
+    if (WinID >= 0)
+        return;        // do not show if attached to an existing window
     XDefineCursor(disp, win, 0);
 }