summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2004-09-04 15:07:16 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2004-09-04 15:07:16 +0000
commit59e481fab5ca156e5924ded00223f207a1638b1b (patch)
treecfd07eece0b3186545ba777ffbb15454c8a9d3f4 /gdk
parent3636328e69078d233c14f62a348e41a1e03711f4 (diff)
downloadgdk-pixbuf-59e481fab5ca156e5924ded00223f207a1638b1b.tar.gz
Revert accidental change from Aug 02 that removed a flush of the X
Sat Sep 4 16:51:00 2004 Søren Sandmann <sandmann@redhat.com> * gdk/x11/gdkevents-x11.c (gdk_event_prepare): Revert accidental change from Aug 02 that removed a flush of the X connection from gdk_event_prepare() causing applications to get stuck. (#151732, Richard Hoelscher).
Diffstat (limited to 'gdk')
-rw-r--r--gdk/x11/gdkevents-x11.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
index bb121dc22..56dd4451f 100644
--- a/gdk/x11/gdkevents-x11.c
+++ b/gdk/x11/gdkevents-x11.c
@@ -2151,13 +2151,6 @@ _gdk_events_queue (GdkDisplay *display)
}
}
-static gboolean
-has_events_already (GdkDisplay *display)
-{
- gboolean r = XEventsQueued (GDK_DISPLAY_XDISPLAY (display), QueuedAlready);
- return r;
-}
-
static gboolean
gdk_event_prepare (GSource *source,
gint *timeout)
@@ -2169,7 +2162,7 @@ gdk_event_prepare (GSource *source,
*timeout = -1;
retval = (_gdk_event_queue_find_first (display) != NULL ||
- has_events_already (display));
+ gdk_check_xpending (display));
GDK_THREADS_LEAVE ();
@@ -2206,15 +2199,15 @@ gdk_event_dispatch (GSource *source,
GDK_THREADS_ENTER ();
_gdk_events_queue (display);
-
event = _gdk_event_unqueue (display);
if (event)
{
if (_gdk_event_func)
(*_gdk_event_func) (event, _gdk_event_data);
+
gdk_event_free (event);
- }
+ }
GDK_THREADS_LEAVE ();