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:
Matthias Clasen 2007-02-16 04:01:50 +00:00 committed by Matthias Clasen
parent a2c86932f5
commit e4b166722c
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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;
}