[xfwm4/f17] Add patch for gtk3 window handling. Fixes bug #829906

Kevin Fenzi kevin at fedoraproject.org
Wed Nov 28 03:22:55 UTC 2012


commit 3fe57951ff8ee21f988e90dab19f99aadfa0e02b
Author: Kevin Fenzi <kevin at scrye.com>
Date:   Tue Nov 27 20:22:38 2012 -0700

    Add patch for gtk3 window handling. Fixes bug #829906

 xfwm4-4.8.3-gtk3-windows.patch |   72 ++++++++++++++++++++++++++++++++++++++++
 xfwm4.spec                     |    9 ++++-
 2 files changed, 80 insertions(+), 1 deletions(-)
---
diff --git a/xfwm4-4.8.3-gtk3-windows.patch b/xfwm4-4.8.3-gtk3-windows.patch
new file mode 100644
index 0000000..487b77f
--- /dev/null
+++ b/xfwm4-4.8.3-gtk3-windows.patch
@@ -0,0 +1,72 @@
+diff -Nur xfwm4-4.8.3.orig/src/display.h xfwm4-4.8.3/src/display.h
+--- xfwm4-4.8.3.orig/src/display.h	2011-12-19 12:22:19.000000000 -0700
++++ xfwm4-4.8.3/src/display.h	2012-11-24 13:03:59.888575009 -0700
+@@ -163,7 +163,8 @@
+     NET_WM_MOVERESIZE_SIZE_LEFT,
+     NET_WM_MOVERESIZE_MOVE,
+     NET_WM_MOVERESIZE_SIZE_KEYBOARD,
+-    NET_WM_MOVERESIZE_MOVE_KEYBOARD
++    NET_WM_MOVERESIZE_MOVE_KEYBOARD,
++    NET_WM_MOVERESIZE_CANCEL
+ };
+ 
+ enum
+diff -Nur xfwm4-4.8.3.orig/src/moveresize.c xfwm4-4.8.3/src/moveresize.c
+--- xfwm4-4.8.3.orig/src/moveresize.c	2011-12-19 12:22:19.000000000 -0700
++++ xfwm4-4.8.3/src/moveresize.c	2012-11-24 13:03:59.889575015 -0700
+@@ -617,7 +617,7 @@
+     eventFilterStatus status = EVENT_FILTER_STOP;
+     MoveResizeData *passdata = (MoveResizeData *) data;
+     Client *c = NULL;
+-    gboolean moving = TRUE;
++    gboolean moving;
+     gboolean warp_pointer = FALSE;
+     XWindowChanges wc;
+     int prev_x, prev_y, delta;
+@@ -631,6 +631,12 @@
+     display_info = screen_info->display_info;
+     configure_flags = NO_CFG_FLAG;
+ 
++    /*
++     * Clients may choose to end the move operation,
++     * we use XFWM_FLAG_MOVING_RESIZING for that.
++     */
++    moving = FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING);
++
+     /* Update the display time */
+     myDisplayUpdateCurrentTime (display_info, xevent);
+ 
+@@ -1184,7 +1190,12 @@
+     screen_info = c->screen_info;
+     display_info = screen_info->display_info;
+     status = EVENT_FILTER_STOP;
+-    resizing = TRUE;
++
++    /*
++     * Clients may choose to end the resize operation,
++     * we use XFWM_FLAG_MOVING_RESIZING for that.
++     */
++    resizing = FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING);
+ 
+     frame_x = frameX (c);
+     frame_y = frameY (c);
+diff -Nur xfwm4-4.8.3.orig/src/netwm.c xfwm4-4.8.3/src/netwm.c
+--- xfwm4-4.8.3.orig/src/netwm.c	2011-12-19 12:22:19.000000000 -0700
++++ xfwm4-4.8.3/src/netwm.c	2012-11-24 13:03:59.889575015 -0700
+@@ -671,10 +671,15 @@
+             resize = TRUE; /* Resize */
+             break;
+         case NET_WM_MOVERESIZE_MOVE:
+-        default:
+             event->type = ButtonPress;
+             resize = FALSE; /* Move */
+             break;
++        case NET_WM_MOVERESIZE_CANCEL:
++            FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING);
++            /* Walk through */
++        default: /* Do nothing */
++            return;
++            break;
+     }
+ 
+     if (!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
diff --git a/xfwm4.spec b/xfwm4.spec
index 1daa138..0a17b5e 100644
--- a/xfwm4.spec
+++ b/xfwm4.spec
@@ -2,7 +2,7 @@
 
 Name:           xfwm4
 Version:        4.8.3
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Next generation window manager for Xfce
 
 Group:          User Interface/Desktops
@@ -11,6 +11,9 @@ URL:            http://www.xfce.org/
 Source0:        http://archive.xfce.org/src/xfce/%{name}/%{xfceversion}/%{name}-%{version}.tar.bz2
 # Use Nodoka Theme
 Patch0:         xfwm4-4.6.1-nodoka.patch
+# Fix gtk3 window behavior
+# https://bugzilla.redhat.com/show_bug.cgi?id=829906
+Patch1:         xfwm4-4.8.3-gtk3-windows.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libxfce4ui-devel >= %{xfceversion}
@@ -35,6 +38,7 @@ xfwm4 is a window manager compatible with GNOME, GNOME2, KDE2, KDE3 and Xfce.
 %if 0%{?fedora}
 %patch0 -p1 -b .nodoka
 %endif
+%patch1 -p1
 
 
 %build
@@ -90,6 +94,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Sat Nov 24 2012 Kevin Fenzi <kevin at scrye.com> 4.8.3-3
+- Add patch for gtk3 window handling. Fixes bug #829906
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.8.3-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list