From 59e481fab5ca156e5924ded00223f207a1638b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sandmann?= Date: Sat, 4 Sep 2004 15:07:16 +0000 Subject: [PATCH] Revert accidental change from Aug 02 that removed a flush of the X MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sat Sep 4 16:51:00 2004 Søren Sandmann * 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). --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gdk/x11/gdkevents-x11.c | 13 +++---------- 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index eaa86b3cbd..6fe47bdb8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Sep 4 16:51:00 2004 Søren Sandmann + + * 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). + Fri Sep 3 22:45:03 2004 Matthias Clasen * gtk/gtkuimanager.c (print_node): Don't print out attributes diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index eaa86b3cbd..6fe47bdb8e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Sat Sep 4 16:51:00 2004 Søren Sandmann + + * 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). + Fri Sep 3 22:45:03 2004 Matthias Clasen * gtk/gtkuimanager.c (print_node): Don't print out attributes diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index eaa86b3cbd..6fe47bdb8e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Sat Sep 4 16:51:00 2004 Søren Sandmann + + * 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). + Fri Sep 3 22:45:03 2004 Matthias Clasen * gtk/gtkuimanager.c (print_node): Don't print out attributes diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index eaa86b3cbd..6fe47bdb8e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Sat Sep 4 16:51:00 2004 Søren Sandmann + + * 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). + Fri Sep 3 22:45:03 2004 Matthias Clasen * gtk/gtkuimanager.c (print_node): Don't print out attributes diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index bb121dc22d..56dd4451f2 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 ();