mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
Be more careful when checking for ButtonRelease events that end implicit
2007-02-15 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdmain-x11.c (_gdk_xgrab_check_button_event): Be more careful when checking for ButtonRelease events that end implicit grabs. (#386618, Christof Krüger) svn path=/trunk/; revision=17304
This commit is contained in:
parent
a2c86932f5
commit
e4b166722c
@ -1,3 +1,9 @@
|
||||
2007-02-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdmain-x11.c (_gdk_xgrab_check_button_event): Be more
|
||||
careful when checking for ButtonRelease events that end implicit
|
||||
grabs. (#386618, Christof Krüger)
|
||||
|
||||
2007-02-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (_gtk_text_btree_delete): Free the lines
|
||||
|
@ -504,6 +504,12 @@ _gdk_xgrab_check_destroy (GdkWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
#define GDK_ANY_BUTTON_MASK (GDK_BUTTON1_MASK | \
|
||||
GDK_BUTTON2_MASK | \
|
||||
GDK_BUTTON3_MASK | \
|
||||
GDK_BUTTON4_MASK | \
|
||||
GDK_BUTTON5_MASK)
|
||||
|
||||
/**
|
||||
* _gdk_xgrab_check_button_event:
|
||||
* @window: a #GdkWindow
|
||||
@ -533,7 +539,7 @@ _gdk_xgrab_check_button_event (GdkWindow *window,
|
||||
case ButtonRelease:
|
||||
if (display_x11->pointer_xgrab_window &&
|
||||
display_x11->pointer_xgrab_implicit &&
|
||||
(xevent->xbutton.state & ~(GDK_BUTTON1_MASK << (xevent->xbutton.button - 1))) == 0)
|
||||
(xevent->xbutton.state & GDK_ANY_BUTTON_MASK & ~(GDK_BUTTON1_MASK << (xevent->xbutton.button - 1))) == 0)
|
||||
{
|
||||
display_x11->pointer_xgrab_window = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user