changeset 31556:f570e2ab2f1a

Re-enable keyboard input for GUI video window.
author reimar
date Fri, 02 Jul 2010 19:50:23 +0000
parents 1891f87cfdc5
children 84f43ca3fad1
files libvo/x11_common.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Fri Jul 02 19:19:21 2010 +0000
+++ b/libvo/x11_common.c	Fri Jul 02 19:50:23 2010 +0000
@@ -1085,9 +1085,14 @@
       XInstallColormap(mDisplay, col_map);
     }
     if (WinID) {
+      // Expose events can only really be handled by us, so request them.
+      // Do not remove existing masks so GUI keeps working.
+      XWindowAttributes attribs;
+      XGetWindowAttributes(mDisplay, vo_window, &attribs);
+      vo_x11_selectinput_witherr(mDisplay, vo_window,
+                                 attribs.your_event_mask | ExposureMask);
+
       vo_x11_update_geometry();
-      // Expose events can only really be handled by us, so request them.
-      vo_x11_selectinput_witherr(mDisplay, vo_window, ExposureMask);
     } else
       // Do not capture events since it might break the parent application
       // if it relies on events being forwarded to the parent of WinID.