Paste #Oku1xusK44vhCuNF07c9

diff -Nur xfwm4-4.12.3/debian/changelog xfwm4/debian/changelog
xfwm4-4.12.3/debian/changelog [2015-05-20 09:36:07.000000000 -0400]
xfwm4/debian/changelog [2016-03-29 18:55:39.534614759 -0400]
1 xfwm4 (4.12.3-1ubuntu2) xenial; urgency=medium
2
3 * Merge from Debian unreleased VCS. Remaining changes:
4 - Add -DMONITOR_ROOT_PIXMAP to CPPFLAGS for xubuntu seamless greeter
5 to desktop transition.
6
7 -- Unit 193 <unit193@ubuntu.com> Tue, 29 Mar 2016 18:55:14 -0400
8
9 xfwm4 (4.12.3-2) UNRELEASED; urgency=medium
10
11 * debian/patches
12 - 0001-Only-check-for-known-buttons-in-_NET_WM_MOVERESIZE added, fix xfwm4
13 freeze when clicking on the menu bar of KDE application. closes: #819228
14 * debian/control:
15 - update standards version to 3.9.7.
16
17 -- Yves-Alexis Perez <corsac@debian.org> Fri, 25 Mar 2016 09:08:20 +0100
18
1 19 xfwm4 (4.12.3-1ubuntu1) wily; urgency=low
2 20
3 21 * Merge from Debian unstable. Remaining changes:
diff -Nur xfwm4-4.12.3/debian/control xfwm4/debian/control
xfwm4-4.12.3/debian/control [2015-05-17 12:16:35.000000000 -0400]
xfwm4/debian/control [2016-03-29 18:56:13.690262008 -0400]
11 11 libxfce4util-dev (>= 4.10.0), libxfce4ui-1-dev (>= 4.11.0),
12 12 libxfconf-0-dev (>= 4.10.0), libwnck-dev, intltool, libstartup-notification0-dev
13 13 Build-Conflicts: libxfcegui4-dev (<< 4.7.0)
14 Standards-Version: 3.9.6
14 Standards-Version: 3.9.7
15 15 Homepage: http://www.xfce.org/
16 16 Vcs-Svn: svn://anonscm.debian.org/pkg-xfce/desktop/trunk/xfwm4/
17 17 Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-xfce/desktop/trunk/xfwm4/
diff -Nur xfwm4-4.12.3/debian/patches/0001-Only-check-for-known-buttons-in-_NET_WM_MOVERESIZE.patch xfwm4/debian/patches/0001-Only-check-for-known-buttons-in-_NET_WM_MOVERESIZE.patch
xfwm4-4.12.3/debian/patches/0001-Only-check-for-known-buttons-in-_NET_WM_MOVERESIZE.patch [1969-12-31 19:00:00.000000000 -0500]
xfwm4/debian/patches/0001-Only-check-for-known-buttons-in-_NET_WM_MOVERESIZE.patch [2016-03-29 18:51:39.841091033 -0400]
1 From 71d37e110d78d49a1476235aaa61e8614ca761e1 Mon Sep 17 00:00:00 2001
2 From: Olivier Fourdan <fourdan@xfce.org>
3 Date: Mon, 18 May 2015 22:18:48 +0200
4 Subject: [PATCH] Only check for known buttons in _NET_WM_MOVERESIZE
5
6 For _NET_WM_MOVERESIZE requests, if the given button does not match any
7 available physical button, we would wait for that (impossible) button
8 combination to be released.
9
10 Check that the given button is one of the well known button or just wait
11 for any button release otherwise.
12
13 That fixes an issue with KDE apps where clicking on the menu bar to move
14 the window would hang forever after the mouse button is depressed.
15
16 Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
17 ---
18 src/moveresize.c | 28 ++++++++++++++++++++--------
19 src/netwm.c | 22 +++-------------------
20 2 files changed, 23 insertions(+), 27 deletions(-)
21
22 diff --git a/src/moveresize.c b/src/moveresize.c
23 index c605b17..411520d 100644
24 --- a/src/moveresize.c
25 +++ b/src/moveresize.c
26 @@ -618,11 +618,19 @@ static eventFilterStatus
27 clientButtonReleaseFilter (XEvent * xevent, gpointer data)
28 {
29 MoveResizeData *passdata = (MoveResizeData *) data;
30 + ScreenInfo *screen_info;
31 + Client *c;
32 +
33 + c = passdata->c;
34 + screen_info = c->screen_info;
35
36 TRACE ("entering clientButtonReleaseFilter");
37
38 - if ((xevent->type == ButtonRelease) &&
39 - (xevent->xbutton.button == passdata->button))
40 + if ((xevent->type == ButtonRelease &&
41 + (passdata->button == AnyButton ||
42 + passdata->button == xevent->xbutton.button)) ||
43 + (xevent->type == KeyPress &&
44 + xevent->xkey.keycode == screen_info->params->keys[KEY_CANCEL].keycode))
45 {
46 gtk_main_quit ();
47 return EVENT_FILTER_STOP;
48 @@ -986,7 +994,9 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
49 else if (xevent->type == ButtonRelease)
50 {
51 moving = FALSE;
52 - passdata->released = passdata->use_keys || (xevent->xbutton.button == passdata->button);
53 + passdata->released = (passdata->use_keys ||
54 + passdata->button == AnyButton ||
55 + passdata->button == xevent->xbutton.button);
56 }
57 else if (xevent->type == MotionNotify)
58 {
59 @@ -1175,7 +1185,7 @@ clientMove (Client * c, XEvent * ev)
60 passdata.use_keys = FALSE;
61 passdata.grab = FALSE;
62 passdata.released = FALSE;
63 - passdata.button = 0;
64 + passdata.button = AnyButton;
65 passdata.is_transient = clientIsValidTransientOrModal (c);
66 passdata.move_resized = FALSE;
67 passdata.wireframe = NULL;
68 @@ -1287,7 +1297,7 @@ clientMove (Client * c, XEvent * ev)
69 }
70 clientConfigure (c, &wc, changes, passdata.configure_flags);
71
72 - if (!passdata.released)
73 + if (passdata.button != AnyButton && !passdata.released)
74 {
75 /* If this is a drag-move, wait for the button to be released.
76 * If we don't, we might get release events in the wrong place.
77 @@ -1638,7 +1648,9 @@ clientResizeEventFilter (XEvent * xevent, gpointer data)
78 else if (xevent->type == ButtonRelease)
79 {
80 resizing = FALSE;
81 - passdata->released = (passdata->use_keys || (xevent->xbutton.button == passdata->button));
82 + passdata->released = (passdata->use_keys ||
83 + passdata->button == AnyButton ||
84 + passdata->button == xevent->xbutton.button);
85 }
86 else if ((xevent->type == UnmapNotify) && (xevent->xunmap.window == c->window))
87 {
88 @@ -1715,7 +1727,7 @@ clientResize (Client * c, int handle, XEvent * ev)
89 passdata.use_keys = FALSE;
90 passdata.grab = FALSE;
91 passdata.released = FALSE;
92 - passdata.button = 0;
93 + passdata.button = AnyButton;
94 passdata.handle = handle;
95 passdata.wireframe = NULL;
96 w_orig = c->width;
97 @@ -1819,7 +1831,7 @@ clientResize (Client * c, int handle, XEvent * ev)
98 }
99 clientReconfigure (c, NO_CFG_FLAG);
100
101 - if (!passdata.released)
102 + if (passdata.button != AnyButton && !passdata.released)
103 {
104 /* If this is a drag-resize, wait for the button to be released.
105 * If we don't, we might get release events in the wrong place.
106 diff --git a/src/netwm.c b/src/netwm.c
107 index 93ff43f..ef3552c 100644
108 --- a/src/netwm.c
109 +++ b/src/netwm.c
110 @@ -613,26 +613,10 @@ clientNetMoveResize (Client * c, XClientMessageEvent * ev)
111 button = (int) ev->data.l[3];
112 event = (XEvent *) ev;
113
114 - if (button == 0)
115 + /* We don't deal with button > 7, in such a case we pretent it's just any button */
116 + if (button > Button7)
117 {
118 - button_mask = getMouseXY (screen_info, c->window, &dx, &dy);
119 - if (button_mask & Button1Mask)
120 - {
121 - button = Button1;
122 - }
123 - else if (button_mask & Button2Mask)
124 - {
125 - button = Button2;
126 - }
127 - else if (button_mask & Button3Mask)
128 - {
129 - button = Button3;
130 - }
131 - else
132 - {
133 - /* Fallback */
134 - button = Button1;
135 - }
136 + button = AnyButton;
137 }
138
139 corner = CORNER_BOTTOM_RIGHT;
140 --
141 2.8.0.rc3
142