1 |
ssuominen 12/12/31 14:44:22 |
2 |
|
3 |
Added: xfwm4-4.10.0-gtk34.patch |
4 |
Log: |
5 |
Implement NET_WM_MOVERESIZE_CANCEL message wrt bug #442218. Patch is from upstream. |
6 |
|
7 |
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 4868F14D) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 xfce-base/xfwm4/files/xfwm4-4.10.0-gtk34.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-base/xfwm4/files/xfwm4-4.10.0-gtk34.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-base/xfwm4/files/xfwm4-4.10.0-gtk34.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: xfwm4-4.10.0-gtk34.patch |
16 |
=================================================================== |
17 |
http://bugs.gentoo.org/442218 |
18 |
|
19 |
From 099614e3f045e06db7ab509e174510ea74857adb Mon Sep 17 00:00:00 2001 |
20 |
From: Olivier Fourdan <fourdan@××××.org> |
21 |
Date: Wed, 18 Jul 2012 20:12:07 +0000 |
22 |
Subject: Implement NET_WM_MOVERESIZE_CANCEL message (bug #8949) |
23 |
|
24 |
as gtk+-3.4 now uses it. |
25 |
--- |
26 |
diff --git a/src/display.h b/src/display.h |
27 |
index 1ad2ef8..8797237 100644 |
28 |
--- a/src/display.h |
29 |
+++ b/src/display.h |
30 |
@@ -163,7 +163,8 @@ enum |
31 |
NET_WM_MOVERESIZE_SIZE_LEFT, |
32 |
NET_WM_MOVERESIZE_MOVE, |
33 |
NET_WM_MOVERESIZE_SIZE_KEYBOARD, |
34 |
- NET_WM_MOVERESIZE_MOVE_KEYBOARD |
35 |
+ NET_WM_MOVERESIZE_MOVE_KEYBOARD, |
36 |
+ NET_WM_MOVERESIZE_CANCEL |
37 |
}; |
38 |
|
39 |
enum |
40 |
diff --git a/src/moveresize.c b/src/moveresize.c |
41 |
index 9893c30..a98bdf7 100644 |
42 |
--- a/src/moveresize.c |
43 |
+++ b/src/moveresize.c |
44 |
@@ -827,7 +827,7 @@ clientMoveEventFilter (XEvent * xevent, gpointer data) |
45 |
eventFilterStatus status = EVENT_FILTER_STOP; |
46 |
MoveResizeData *passdata = (MoveResizeData *) data; |
47 |
Client *c = NULL; |
48 |
- gboolean moving = TRUE; |
49 |
+ gboolean moving; |
50 |
XWindowChanges wc; |
51 |
int prev_x, prev_y; |
52 |
|
53 |
@@ -840,6 +840,12 @@ clientMoveEventFilter (XEvent * xevent, gpointer data) |
54 |
display_info = screen_info->display_info; |
55 |
configure_flags = NO_CFG_FLAG; |
56 |
|
57 |
+ /* |
58 |
+ * Clients may choose to end the move operation, |
59 |
+ * we use XFWM_FLAG_MOVING_RESIZING for that. |
60 |
+ */ |
61 |
+ moving = FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING); |
62 |
+ |
63 |
/* Update the display time */ |
64 |
myDisplayUpdateCurrentTime (display_info, xevent); |
65 |
|
66 |
@@ -1294,7 +1300,12 @@ clientResizeEventFilter (XEvent * xevent, gpointer data) |
67 |
screen_info = c->screen_info; |
68 |
display_info = screen_info->display_info; |
69 |
status = EVENT_FILTER_STOP; |
70 |
- resizing = TRUE; |
71 |
+ |
72 |
+ /* |
73 |
+ * Clients may choose to end the resize operation, |
74 |
+ * we use XFWM_FLAG_MOVING_RESIZING for that. |
75 |
+ */ |
76 |
+ resizing = FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING); |
77 |
|
78 |
frame_x = frameX (c); |
79 |
frame_y = frameY (c); |
80 |
diff --git a/src/netwm.c b/src/netwm.c |
81 |
index 545e64a..1352f08 100644 |
82 |
--- a/src/netwm.c |
83 |
+++ b/src/netwm.c |
84 |
@@ -695,10 +695,15 @@ clientNetMoveResize (Client * c, XClientMessageEvent * ev) |
85 |
resize = TRUE; /* Resize */ |
86 |
break; |
87 |
case NET_WM_MOVERESIZE_MOVE: |
88 |
- default: |
89 |
event->type = ButtonPress; |
90 |
resize = FALSE; /* Move */ |
91 |
break; |
92 |
+ case NET_WM_MOVERESIZE_CANCEL: |
93 |
+ FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING); |
94 |
+ /* Walk through */ |
95 |
+ default: /* Do nothing */ |
96 |
+ return; |
97 |
+ break; |
98 |
} |
99 |
|
100 |
if (!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN)) |
101 |
-- |
102 |
cgit v0.9.0.3 |