Contents of /trunk/xfwm4/patches/xfwm4-4.10.0-gtk3-windows.patch
Parent Directory | Revision Log
Revision 1896 -
(show annotations)
(download)
Tue Sep 11 14:33:06 2012 UTC (12 years ago) by niro
File size: 2649 byte(s)
Tue Sep 11 14:33:06 2012 UTC (12 years ago) by niro
File size: 2649 byte(s)
-files and patches for xfwm4
1 | From 0b39bbe0b3b5bf514dea223ec96cd25ea4e1444f Mon Sep 17 00:00:00 2001 |
2 | From: Olivier Fourdan <fourdan@xfce.org> |
3 | Date: Wed, 18 Jul 2012 20:12:07 +0000 |
4 | Subject: Implement NET_WM_MOVERESIZE_CANCEL message (bug #8949) |
5 | |
6 | as gtk+-3.4 now uses it. |
7 | --- |
8 | diff --git a/src/display.h b/src/display.h |
9 | index 1ad2ef8..8797237 100644 |
10 | --- a/src/display.h |
11 | +++ b/src/display.h |
12 | @@ -163,7 +163,8 @@ enum |
13 | NET_WM_MOVERESIZE_SIZE_LEFT, |
14 | NET_WM_MOVERESIZE_MOVE, |
15 | NET_WM_MOVERESIZE_SIZE_KEYBOARD, |
16 | - NET_WM_MOVERESIZE_MOVE_KEYBOARD |
17 | + NET_WM_MOVERESIZE_MOVE_KEYBOARD, |
18 | + NET_WM_MOVERESIZE_CANCEL |
19 | }; |
20 | |
21 | enum |
22 | diff --git a/src/moveresize.c b/src/moveresize.c |
23 | index 9893c30..a98bdf7 100644 |
24 | --- a/src/moveresize.c |
25 | +++ b/src/moveresize.c |
26 | @@ -827,7 +827,7 @@ clientMoveEventFilter (XEvent * xevent, gpointer data) |
27 | eventFilterStatus status = EVENT_FILTER_STOP; |
28 | MoveResizeData *passdata = (MoveResizeData *) data; |
29 | Client *c = NULL; |
30 | - gboolean moving = TRUE; |
31 | + gboolean moving; |
32 | XWindowChanges wc; |
33 | int prev_x, prev_y; |
34 | |
35 | @@ -840,6 +840,12 @@ clientMoveEventFilter (XEvent * xevent, gpointer data) |
36 | display_info = screen_info->display_info; |
37 | configure_flags = NO_CFG_FLAG; |
38 | |
39 | + /* |
40 | + * Clients may choose to end the move operation, |
41 | + * we use XFWM_FLAG_MOVING_RESIZING for that. |
42 | + */ |
43 | + moving = FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING); |
44 | + |
45 | /* Update the display time */ |
46 | myDisplayUpdateCurrentTime (display_info, xevent); |
47 | |
48 | @@ -1294,7 +1300,12 @@ clientResizeEventFilter (XEvent * xevent, gpointer data) |
49 | screen_info = c->screen_info; |
50 | display_info = screen_info->display_info; |
51 | status = EVENT_FILTER_STOP; |
52 | - resizing = TRUE; |
53 | + |
54 | + /* |
55 | + * Clients may choose to end the resize operation, |
56 | + * we use XFWM_FLAG_MOVING_RESIZING for that. |
57 | + */ |
58 | + resizing = FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING); |
59 | |
60 | frame_x = frameX (c); |
61 | frame_y = frameY (c); |
62 | diff --git a/src/netwm.c b/src/netwm.c |
63 | index 545e64a..1352f08 100644 |
64 | --- a/src/netwm.c |
65 | +++ b/src/netwm.c |
66 | @@ -695,10 +695,15 @@ clientNetMoveResize (Client * c, XClientMessageEvent * ev) |
67 | resize = TRUE; /* Resize */ |
68 | break; |
69 | case NET_WM_MOVERESIZE_MOVE: |
70 | - default: |
71 | event->type = ButtonPress; |
72 | resize = FALSE; /* Move */ |
73 | break; |
74 | + case NET_WM_MOVERESIZE_CANCEL: |
75 | + FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING); |
76 | + /* Walk through */ |
77 | + default: /* Do nothing */ |
78 | + return; |
79 | + break; |
80 | } |
81 | |
82 | if (!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN)) |
83 | -- |
84 | cgit v0.9.0.3 |