Flush after ungrabbing the server.

Mon Apr  7 19:43:15 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
        after ungrabbing the server.

        * gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
        calls to XFlush().

        * gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
        Use gdk_x11_display_grab/ungrab.
This commit is contained in:
Owen Taylor 2003-04-07 23:47:59 +00:00 committed by Owen Taylor
parent ade1ae83d8
commit 1926dbc1f6
8 changed files with 62 additions and 5 deletions

View File

@ -1,3 +1,14 @@
Mon Apr 7 19:43:15 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
after ungrabbing the server.
* gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
calls to XFlush().
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
Use gdk_x11_display_grab/ungrab.
2003-04-07 Matthias Clasen <maclas@gmx.de> 2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values): * gtk/gtktextlayout.c (set_para_values):

View File

@ -1,3 +1,14 @@
Mon Apr 7 19:43:15 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
after ungrabbing the server.
* gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
calls to XFlush().
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
Use gdk_x11_display_grab/ungrab.
2003-04-07 Matthias Clasen <maclas@gmx.de> 2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values): * gtk/gtktextlayout.c (set_para_values):

View File

@ -1,3 +1,14 @@
Mon Apr 7 19:43:15 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
after ungrabbing the server.
* gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
calls to XFlush().
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
Use gdk_x11_display_grab/ungrab.
2003-04-07 Matthias Clasen <maclas@gmx.de> 2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values): * gtk/gtktextlayout.c (set_para_values):

View File

@ -1,3 +1,14 @@
Mon Apr 7 19:43:15 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
after ungrabbing the server.
* gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
calls to XFlush().
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
Use gdk_x11_display_grab/ungrab.
2003-04-07 Matthias Clasen <maclas@gmx.de> 2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values): * gtk/gtktextlayout.c (set_para_values):

View File

@ -1,3 +1,14 @@
Mon Apr 7 19:43:15 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
after ungrabbing the server.
* gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
calls to XFlush().
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
Use gdk_x11_display_grab/ungrab.
2003-04-07 Matthias Clasen <maclas@gmx.de> 2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextlayout.c (set_para_values): * gtk/gtktextlayout.c (set_para_values):

View File

@ -127,6 +127,7 @@ gdk_display_open (const gchar *display_name)
display_x11 = GDK_DISPLAY_X11 (display); display_x11 = GDK_DISPLAY_X11 (display);
display_x11->use_xft = -1; display_x11->use_xft = -1;
display_x11->use_xshm = TRUE;
display_x11->xdisplay = xdisplay; display_x11->xdisplay = xdisplay;
/* Set up handlers for Xlib internal connections */ /* Set up handlers for Xlib internal connections */
@ -535,7 +536,10 @@ gdk_x11_display_ungrab (GdkDisplay * display)
display_x11->grab_count--; display_x11->grab_count--;
if (display_x11->grab_count == 0) if (display_x11->grab_count == 0)
{
XUngrabServer (display_x11->xdisplay); XUngrabServer (display_x11->xdisplay);
XFlush (display_x11->xdisplay);
}
} }
static void static void

View File

@ -533,7 +533,6 @@ _gdk_x11_copy_to_image (GdkDrawable *drawable,
#define UNGRAB() G_STMT_START { \ #define UNGRAB() G_STMT_START { \
if (have_grab) { \ if (have_grab) { \
gdk_x11_display_ungrab (display); \ gdk_x11_display_ungrab (display); \
XFlush (xdisplay); \
have_grab = FALSE; } \ have_grab = FALSE; } \
} G_STMT_END } G_STMT_END
@ -671,7 +670,6 @@ _gdk_x11_copy_to_image (GdkDrawable *drawable,
if (have_grab) if (have_grab)
{ {
gdk_x11_display_ungrab (display); gdk_x11_display_ungrab (display);
XFlush (xdisplay);
have_grab = FALSE; have_grab = FALSE;
} }

View File

@ -2774,7 +2774,7 @@ _gdk_windowing_window_at_pointer (GdkDisplay *display,
* than we'll end up with inaccurate values for win_x, win_y * than we'll end up with inaccurate values for win_x, win_y
* and the result. * and the result.
*/ */
XGrabServer (xdisplay); gdk_x11_display_grab (display);
XQueryPointer (xdisplay, xwindow, XQueryPointer (xdisplay, xwindow,
&root, &child, &rootx, &rooty, &winx, &winy, &xmask); &root, &child, &rootx, &rooty, &winx, &winy, &xmask);
@ -2789,7 +2789,7 @@ _gdk_windowing_window_at_pointer (GdkDisplay *display,
XQueryPointer (xdisplay, xwindow, XQueryPointer (xdisplay, xwindow,
&root, &xwindow, &rootx, &rooty, &winx, &winy, &xmask); &root, &xwindow, &rootx, &rooty, &winx, &winy, &xmask);
} }
XUngrabServer (xdisplay); gdk_x11_display_ungrab (display);
window = gdk_window_lookup_for_display (GDK_SCREEN_DISPLAY(screen), window = gdk_window_lookup_for_display (GDK_SCREEN_DISPLAY(screen),
xwindow_last); xwindow_last);