summaryrefslogtreecommitdiff
path: root/gdk/wayland/gdkeventsource.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-07-09 18:35:06 -0400
committerKristian Høgsberg <krh@bitplanet.net>2013-07-09 18:38:32 -0400
commit99b78fdd7f21539a288bfe846542b633756ce163 (patch)
tree47adf7f5ca1721c5bd36d85e091efeb0b123f285 /gdk/wayland/gdkeventsource.c
parent0b45a5968f52b25e6d2d6cd6b08a99112825a624 (diff)
downloadgtk+-99b78fdd7f21539a288bfe846542b633756ce163.tar.gz
wayland: Don't clear revents until we've checked for G_IO_HUP
https://bugzilla.gnome.org/show_bug.cgi?id=703892
Diffstat (limited to 'gdk/wayland/gdkeventsource.c')
-rw-r--r--gdk/wayland/gdkeventsource.c8
1 files changed, 4 insertions, 4 deletions
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;
}