summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2014-12-12 14:12:28 -0600
committerBryce Harrington <bryce@osg.samsung.com>2015-01-27 13:50:00 -0800
commit6deb09ef8a72164947cdfa5f2414e292c7672c9c (patch)
treed0a818717d76b03c3a41a020e3c7ab322ef3c7e2
parent1875affcc868ae33e8e42539498bee21bed34635 (diff)
downloadweston-6deb09ef8a72164947cdfa5f2414e292c7672c9c.tar.gz
compositor-x11: Move the x11 event handler to the display loop
While it conceptually makes sense to put the x11 event handler in the compositor "input" loop, the input loop is actually dispatched in the middle of the frame repaint. When the X11 event results in closing the compositor, this can cause the current output to be destroyed just prior to trying to process animations on it. Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=81314 Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
-rw-r--r--src/compositor-x11.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 58634461..194749e3 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1470,6 +1470,7 @@ x11_compositor_create(struct wl_display *display,
struct x11_compositor *c;
struct x11_output *output;
struct weston_config_section *section;
+ struct wl_event_loop *loop;
xcb_screen_iterator_t s;
int i, x = 0, output_count = 0;
int width, height, scale, count;
@@ -1595,8 +1596,9 @@ x11_compositor_create(struct wl_display *display,
x = pixman_region32_extents(&output->base.region)->x2;
}
+ loop = wl_display_get_event_loop(c->base.wl_display);
c->xcb_source =
- wl_event_loop_add_fd(c->base.input_loop,
+ wl_event_loop_add_fd(loop,
xcb_get_file_descriptor(c->conn),
WL_EVENT_READABLE,
x11_compositor_handle_event, c);