From 99b78fdd7f21539a288bfe846542b633756ce163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 9 Jul 2013 18:35:06 -0400 Subject: wayland: Don't clear revents until we've checked for G_IO_HUP https://bugzilla.gnome.org/show_bug.cgi?id=703892 --- gdk/wayland/gdkeventsource.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdk/wayland/gdkeventsource.c') diff --git a/gdk/wayland/gdkeventsource.c b/gdk/wayland/gdkeventsource.c index cb335bd2c1..4bcae9b285 100644 --- a/gdk/wayland/gdkeventsource.c +++ b/gdk/wayland/gdkeventsource.c @@ -150,12 +150,12 @@ _gdk_wayland_display_queue_events (GdkDisplay *display) display_wayland = GDK_WAYLAND_DISPLAY (display); source = (GdkWaylandEventSource *) display_wayland->event_source; + if (source->pfd.revents & G_IO_IN) - { - wl_display_dispatch(display_wayland->wl_display); - source->pfd.revents = 0; - } + wl_display_dispatch (display_wayland->wl_display); if (source->pfd.revents & (G_IO_ERR | G_IO_HUP)) g_error ("Lost connection to wayland compositor"); + + source->pfd.revents = 0; } -- cgit v1.2.1