r37086 - in /desktop/experimental/mutter/debian: changelog patches/02-dont-select-for-XI2-events.patch patches/series

pochu at users.alioth.debian.org pochu at users.alioth.debian.org
Wed Mar 20 16:30:32 UTC 2013


Author: pochu
Date: Wed Mar 20 16:30:31 2013
New Revision: 37086

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=37086
Log:
  + debian/patches/02-dont-select-for-XI2-events.patch:
    - New patch, revert an upstream change to receive XI2 events
      until #696272 is fixed. Thanks to Sjoerd Simons and
      Frédéric Péters for the info and the patch.

Added:
    desktop/experimental/mutter/debian/patches/02-dont-select-for-XI2-events.patch
Modified:
    desktop/experimental/mutter/debian/changelog
    desktop/experimental/mutter/debian/patches/series

Modified: desktop/experimental/mutter/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/mutter/debian/changelog?rev=37086&op=diff
==============================================================================
--- desktop/experimental/mutter/debian/changelog [utf-8] (original)
+++ desktop/experimental/mutter/debian/changelog [utf-8] Wed Mar 20 16:30:31 2013
@@ -17,6 +17,10 @@
       - Add gtk-doc-tools to build-depends.
     + d/p/10_Always-send-_NET_WM_FRAME_DRAWN-for-newly-created-wi.patch:
       - Removed, included upstream.
+    + debian/patches/02-dont-select-for-XI2-events.patch:
+      - New patch, revert an upstream change to receive XI2 events
+        until #696272 is fixed. Thanks to Sjoerd Simons and
+        Frédéric Péters for the info and the patch.
 
  -- Sjoerd Simons <sjoerd at debian.org>  Mon, 04 Mar 2013 22:12:55 +0100
 

Added: desktop/experimental/mutter/debian/patches/02-dont-select-for-XI2-events.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/mutter/debian/patches/02-dont-select-for-XI2-events.patch?rev=37086&op=file
==============================================================================
--- desktop/experimental/mutter/debian/patches/02-dont-select-for-XI2-events.patch (added)
+++ desktop/experimental/mutter/debian/patches/02-dont-select-for-XI2-events.patch [utf-8] Wed Mar 20 16:30:31 2013
@@ -1,0 +1,209 @@
+commit d13f338520b84aa741cd21cabb2ed654ea733d8b
+Author: Frédéric Péters <fpeters at 0d.be>
+Date:   Sun Feb 10 19:25:40 2013 +0100
+
+    Revert "Select for XI2 events everywhere else"
+    
+    This reverts commit 774ceec24321ecab0a939f50d856f26e7a954ae3.
+    
+    Conflicts:
+    	src/compositor/compositor.c
+    	src/core/screen.c
+    	src/core/window.c
+
+diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
+index 543c463..a4134a3 100644
+--- a/src/compositor/compositor.c
++++ b/src/compositor/compositor.c
+@@ -150,28 +150,23 @@ get_output_window (MetaScreen *screen)
+   Window       output, xroot;
+   XWindowAttributes attr;
+   long         event_mask;
+-  unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
+-  XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
+ 
+   xroot = meta_screen_get_xroot (screen);
+-  output = XCompositeGetOverlayWindow (xdisplay, xroot);
+ 
+-  meta_core_add_old_event_mask (xdisplay, output, &mask);
++  event_mask = FocusChangeMask |
++               ExposureMask |
++               EnterWindowMask | LeaveWindowMask |
++	       PointerMotionMask |
++               PropertyChangeMask |
++               ButtonPressMask | ButtonReleaseMask |
++               KeyPressMask | KeyReleaseMask;
+ 
+-  XISetMask (mask.mask, XI_KeyPress);
+-  XISetMask (mask.mask, XI_KeyRelease);
+-  XISetMask (mask.mask, XI_ButtonPress);
+-  XISetMask (mask.mask, XI_ButtonRelease);
+-  XISetMask (mask.mask, XI_Enter);
+-  XISetMask (mask.mask, XI_Leave);
+-  XISetMask (mask.mask, XI_FocusIn);
+-  XISetMask (mask.mask, XI_FocusOut);
+-  XISetMask (mask.mask, XI_Motion);
+-  XISelectEvents (xdisplay, output, &mask, 1);
++  output = XCompositeGetOverlayWindow (xdisplay, xroot);
+ 
+-  event_mask = ExposureMask | PropertyChangeMask;
+   if (XGetWindowAttributes (xdisplay, output, &attr))
+-    event_mask |= attr.your_event_mask;
++      {
++        event_mask |= attr.your_event_mask;
++      }
+ 
+   XSelectInput (xdisplay, output, event_mask);
+ 
+@@ -523,6 +518,8 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
+   Display        *xdisplay      = meta_display_get_xdisplay (display);
+   Window          xwin;
+   gint            width, height;
++  XWindowAttributes attr;
++  long            event_mask;
+ 
+   /* Check if the screen is already managed */
+   if (meta_screen_get_compositor_data (screen))
+@@ -561,31 +558,21 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
+ 
+   XResizeWindow (xdisplay, xwin, width, height);
+ 
+-  {
+-    long event_mask;
+-    unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
+-    XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
+-    XWindowAttributes attr;
+-
+-    meta_core_add_old_event_mask (xdisplay, xwin, &mask);
+-
+-    XISetMask (mask.mask, XI_KeyPress);
+-    XISetMask (mask.mask, XI_KeyRelease);
+-    XISetMask (mask.mask, XI_ButtonPress);
+-    XISetMask (mask.mask, XI_ButtonRelease);
+-    XISetMask (mask.mask, XI_Enter);
+-    XISetMask (mask.mask, XI_Leave);
+-    XISetMask (mask.mask, XI_FocusIn);
+-    XISetMask (mask.mask, XI_FocusOut);
+-    XISetMask (mask.mask, XI_Motion);
+-    XISelectEvents (xdisplay, xwin, &mask, 1);
+-
+-    event_mask = ExposureMask | PropertyChangeMask | StructureNotifyMask;
+-    if (XGetWindowAttributes (xdisplay, xwin, &attr))
+-      event_mask |= attr.your_event_mask;
+-
+-    XSelectInput (xdisplay, xwin, event_mask);
+-  }
++  event_mask = FocusChangeMask |
++               ExposureMask |
++               EnterWindowMask | LeaveWindowMask |
++               PointerMotionMask |
++               PropertyChangeMask |
++               ButtonPressMask | ButtonReleaseMask |
++               KeyPressMask | KeyReleaseMask |
++               StructureNotifyMask;
++
++  if (XGetWindowAttributes (xdisplay, xwin, &attr))
++      {
++        event_mask |= attr.your_event_mask;
++      }
++
++  XSelectInput (xdisplay, xwin, event_mask);
+ 
+   info->window_group = meta_window_group_new (screen);
+   info->top_window_group = meta_window_group_new (screen);
+diff --git a/src/core/screen.c b/src/core/screen.c
+index 938606f..c4913dc 100644
+--- a/src/core/screen.c
++++ b/src/core/screen.c
+@@ -648,6 +648,7 @@ meta_screen_new (MetaDisplay *display,
+   MetaScreen *screen;
+   Window xroot;
+   Display *xdisplay;
++  XWindowAttributes attr;
+   Window new_wm_sn_owner;
+   Window current_wm_sn_owner;
+   gboolean replace_current_wm;
+@@ -762,38 +763,15 @@ meta_screen_new (MetaDisplay *display,
+   /* We need to or with the existing event mask since
+    * gtk+ may be interested in other events.
+    */
+-  {
+-    long event_mask;
+-    unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
+-    XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
+-    XWindowAttributes attr;
+-
+-    meta_core_add_old_event_mask (xdisplay, xroot, &mask);
+-
+-    XISetMask (mask.mask, XI_KeyPress);
+-    XISetMask (mask.mask, XI_KeyRelease);
+-    XISetMask (mask.mask, XI_Enter);
+-    XISetMask (mask.mask, XI_Leave);
+-    XISetMask (mask.mask, XI_FocusIn);
+-    XISetMask (mask.mask, XI_FocusOut);
+-    XISetMask (mask.mask, XI_Motion);
+-#ifdef HAVE_XI23
+-    if (META_DISPLAY_HAS_XINPUT_23 (display))
+-      {
+-        XISetMask (mask.mask, XI_BarrierHit);
+-        XISetMask (mask.mask, XI_BarrierLeave);
+-      }
+-#endif /* HAVE_XI23 */
+-    XISelectEvents (xdisplay, xroot, &mask, 1);
+-
+-    event_mask = (SubstructureRedirectMask | SubstructureNotifyMask |
+-                  StructureNotifyMask | ColormapChangeMask | PropertyChangeMask);
+-    if (XGetWindowAttributes (xdisplay, xroot, &attr))
+-      event_mask |= attr.your_event_mask;
+-
+-    XSelectInput (xdisplay, xroot, event_mask);
+-  }
+-
++  XGetWindowAttributes (xdisplay, xroot, &attr);
++  XSelectInput (xdisplay,
++                xroot,
++                SubstructureRedirectMask | SubstructureNotifyMask |
++                ColormapChangeMask | PropertyChangeMask |
++                LeaveWindowMask | EnterWindowMask |
++                KeyPressMask | KeyReleaseMask |
++                FocusChangeMask | StructureNotifyMask |
++                ExposureMask | attr.your_event_mask);
+   if (meta_error_trap_pop_with_return (display) != Success)
+     {
+       meta_warning (_("Screen %d on display \"%s\" already has a window manager\n"),
+diff --git a/src/core/window.c b/src/core/window.c
+index d3de779..6496ef8 100644
+--- a/src/core/window.c
++++ b/src/core/window.c
+@@ -931,7 +931,9 @@ meta_window_new_with_attrs (MetaDisplay       *display,
+   XAddToSaveSet (display->xdisplay, xwindow);
+   meta_error_trap_pop_with_return (display);
+ 
+-  event_mask = PropertyChangeMask | ColormapChangeMask;
++  event_mask =
++    PropertyChangeMask | EnterWindowMask | LeaveWindowMask |
++    FocusChangeMask | ColormapChangeMask;
+   if (attrs->override_redirect)
+     event_mask |= StructureNotifyMask;
+ 
+@@ -941,20 +943,6 @@ meta_window_new_with_attrs (MetaDisplay       *display,
+    */
+   XSelectInput (display->xdisplay, xwindow, attrs->your_event_mask | event_mask);
+ 
+-  {
+-    unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
+-    XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
+-
+-    meta_core_add_old_event_mask (display->xdisplay, xwindow, &mask);
+-
+-    XISetMask (mask.mask, XI_Enter);
+-    XISetMask (mask.mask, XI_Leave);
+-    XISetMask (mask.mask, XI_FocusIn);
+-    XISetMask (mask.mask, XI_FocusOut);
+-
+-    XISelectEvents (display->xdisplay, xwindow, &mask, 1);
+-  }
+-
+   has_shape = FALSE;
+ #ifdef HAVE_SHAPE
+   if (META_DISPLAY_HAS_SHAPE (display))

Modified: desktop/experimental/mutter/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/mutter/debian/patches/series?rev=37086&op=diff
==============================================================================
--- desktop/experimental/mutter/debian/patches/series [utf-8] (original)
+++ desktop/experimental/mutter/debian/patches/series [utf-8] Wed Mar 20 16:30:31 2013
@@ -1,1 +1,2 @@
 01_Wcast-align.patch
+02-dont-select-for-XI2-events.patch




More information about the pkg-gnome-commits mailing list