[arch-commits] Commit in gtk3/trunk (PKGBUILD moveresize.patch)

Ionut Biru ibiru at archlinux.org
Sun Dec 11 21:20:45 UTC 2011


    Date: Sunday, December 11, 2011 @ 16:20:45
  Author: ibiru
Revision: 144949

fix capture the cursor and not release it
whenever a gtk3 window attempts to move or resize a window.

https://bugzilla.gnome.org/show_bug.cgi?id=650943

Added:
  gtk3/trunk/moveresize.patch
Modified:
  gtk3/trunk/PKGBUILD

------------------+
 PKGBUILD         |    9 ++++++---
 moveresize.patch |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-12-11 16:47:15 UTC (rev 144948)
+++ PKGBUILD	2011-12-11 21:20:45 UTC (rev 144949)
@@ -3,7 +3,7 @@
 
 pkgname=gtk3
 pkgver=3.2.2
-pkgrel=3
+pkgrel=4
 pkgdesc="GTK+ is a multi-platform toolkit (v3)"
 arch=('i686' 'x86_64')
 url="http://www.gtk.org/"
@@ -15,14 +15,17 @@
 license=('LGPL')
 source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/3.2/gtk+-$pkgver.tar.xz
         settings.ini
-        filechooserdefault_do_not_unref_value_twice.patch)
+        filechooserdefault_do_not_unref_value_twice.patch
+        moveresize.patch)
 sha256sums=('f7ec82de393cd7ae2aa45022576400941704709d1f0f35fb0b17f3be1f2e7d84'
             'c214d3dcdcadda3d642112287524ab3e526ad592b70895c9f3e3733c23701621'
-            '0d6b04d5fc12b7c08e0cff4b94d001d5c167a944b72579fb14fd6de2ee4ad9e6')
+            '0d6b04d5fc12b7c08e0cff4b94d001d5c167a944b72579fb14fd6de2ee4ad9e6'
+            '627f430ccecc95ec61d9a83607469e71e95568c077f7bda849a7fe1c02d0bea7')
 
 build() {
     cd "$srcdir/gtk+-$pkgver"
     patch -Np1 -i "$srcdir/filechooserdefault_do_not_unref_value_twice.patch"
+    patch -Np1 -i "$srcdir/moveresize.patch"
     CXX=/bin/false ./configure --prefix=/usr \
         --sysconfdir=/etc \
         --localstatedir=/var \

Added: moveresize.patch
===================================================================
--- moveresize.patch	                        (rev 0)
+++ moveresize.patch	2011-12-11 21:20:45 UTC (rev 144949)
@@ -0,0 +1,47 @@
+From 89c90ed193331d2ee96f323e10aaafd4366f4b0e Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Sat, 10 Dec 2011 02:21:09 +0000
+Subject: Fix move-resize emulation with XI2
+
+https://bugzilla.gnome.org/show_bug.cgi?id=650943
+---
+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
+index 1ff816e..d48927f 100644
+--- a/gdk/x11/gdkwindow-x11.c
++++ b/gdk/x11/gdkwindow-x11.c
+@@ -4296,6 +4296,33 @@ _gdk_x11_moveresize_handle_event (XEvent *event)
+       if (event->xbutton.button == mv_resize->moveresize_button)
+         finish_drag (mv_resize);
+       break;
++
++#ifdef HAVE_XGENERICEVENTS
++    case GenericEvent:
++      {
++        /* we just assume this is an XI2 event */
++        XIEvent *ev = (XIEvent *) event->xcookie.data;
++        XIDeviceEvent *xev = (XIDeviceEvent *)ev;
++        gint state;
++        switch (ev->evtype)
++          {
++          case XI_Motion:
++            update_pos (mv_resize, xev->root_x, xev->root_y);
++            state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
++            if ((state & button_mask) == 0)
++            finish_drag (mv_resize);
++            break;
++
++          case XI_ButtonRelease:
++            update_pos (mv_resize, xev->root_x, xev->root_y);
++            if (xev->detail == mv_resize->moveresize_button)
++              finish_drag (mv_resize);
++            break;
++          }
++      }
++      break;
++#endif
++
+     }
+   return TRUE;
+ }
+--
+cgit v0.9.0.2




More information about the arch-commits mailing list