[gtk+] x11: Don't ignore button releases after a wmspec move/resize
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Don't ignore button releases after a wmspec move/resize
- Date: Thu, 5 Apr 2012 08:17:35 +0000 (UTC)
commit 7b0fd635fa39a27693655171a4cdc0150ae476ed
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Apr 4 15:54:32 2012 +0200
x11: Don't ignore button releases after a wmspec move/resize
_gdk_x11_moveresize_configure_done() isn't called for wmspec
moves/resizes so we don't have a way to notice when a wmspec
move/resize ends and consequently untrigger the sending of
_NET_WM_MOVERESIZE_CANCEL which results in this message always being
sent on the next button release event. In that case we are marking
that event as handled so it isn't processed further which breaks
button press/release event handling in several widgets.
To fix this we simply allow the normal event handling machinery to run
after sending the _NET_WM_MOVERESIZE_CANCEL message.
https://bugzilla.gnome.org/show_bug.cgi?id=673328
gdk/x11/gdkwindow-x11.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 981572d..4ef6f46 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -4079,7 +4079,7 @@ wmspec_send_message (GdkDisplay *display,
(XEvent *)&xclient);
}
-static gboolean
+static void
handle_wmspec_button_release (GdkDisplay *display,
XEvent *xevent)
{
@@ -4110,11 +4110,8 @@ handle_wmspec_button_release (GdkDisplay *display,
{
display_x11->wm_moveresize_button = 0;
wmspec_send_message (display, window, 0, 0, _NET_WM_MOVERESIZE_CANCEL, 0);
- return TRUE;
}
}
-
- return FALSE;
}
static void
@@ -4395,11 +4392,11 @@ _gdk_x11_moveresize_handle_event (XEvent *event)
GdkDisplay *display = gdk_x11_lookup_xdisplay (event->xany.display);
MoveResizeData *mv_resize = get_move_resize_data (display, FALSE);
- if (handle_wmspec_button_release (display, event))
- return TRUE;
-
if (!mv_resize || !mv_resize->moveresize_window)
- return FALSE;
+ {
+ handle_wmspec_button_release (display, event);
+ return FALSE;
+ }
button_mask = GDK_BUTTON1_MASK << (mv_resize->moveresize_button - 1);
@@ -4479,8 +4476,6 @@ _gdk_x11_moveresize_configure_done (GdkDisplay *display,
XEvent *tmp_event;
MoveResizeData *mv_resize = get_move_resize_data (display, FALSE);
- GDK_X11_DISPLAY (display)->wm_moveresize_button = 0;
-
if (!mv_resize || window != mv_resize->moveresize_window)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]