summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-04-21 19:11:45 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-04-21 19:11:45 +0000
commitdd6426b51ee9dd312cc67beaf7286be4da067b36 (patch)
tree91959e58fad0179afe1accdc364bea1acb5c9ab6 /gdk
parentfeff41c77b2b25ebf61090238ca1e9cd5a572368 (diff)
downloadgtk+-dd6426b51ee9dd312cc67beaf7286be4da067b36.tar.gz
Calling XFlush() after ungrabbing, to avoid problems if the app
Mon Apr 21 15:07:29 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdisplay-x11.c (gdk_display_keyboard/pointer_ungrab): Calling XFlush() after ungrabbing, to avoid problems if the app subsequently blocks on a long-running operation. (#106520, reported by Rajkumar Siva)
Diffstat (limited to 'gdk')
-rw-r--r--gdk/x11/gdkdisplay-x11.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 2e3914c160..20e3058e59 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -413,10 +413,16 @@ void
gdk_display_pointer_ungrab (GdkDisplay *display,
guint32 time)
{
+ Display *xdisplay;
+
g_return_if_fail (GDK_IS_DISPLAY (display));
+
+ xdisplay = GDK_DISPLAY_XDISPLAY (display);
_gdk_input_ungrab_pointer (display, time);
- XUngrabPointer (GDK_DISPLAY_XDISPLAY (display), time);
+ XUngrabPointer (xdisplay, time);
+ XFlush (xdisplay);
+
GDK_DISPLAY_X11 (display)->pointer_xgrab_window = NULL;
}
@@ -451,9 +457,15 @@ void
gdk_display_keyboard_ungrab (GdkDisplay *display,
guint32 time)
{
+ Display *xdisplay;
+
g_return_if_fail (GDK_IS_DISPLAY (display));
+
+ xdisplay = GDK_DISPLAY_XDISPLAY (display);
+
+ XUngrabKeyboard (xdisplay, time);
+ XFlush (xdisplay);
- XUngrabKeyboard (GDK_DISPLAY_XDISPLAY (display), time);
GDK_DISPLAY_X11 (display)->keyboard_xgrab_window = NULL;
}