summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-03-12 01:18:24 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-03-12 01:28:50 -0400
commit22ba60e514e074e4bdee1529aa8d22600712f001 (patch)
treee22a4f5dede8edfedce9390abc8c9c9b051cfa3e
parentaa6019e1254465f882294b90b87b163906197ebc (diff)
x11: Move the xcb fd to the input loop
This way, we handle input just before repaint, similar to the drm backend.
-rw-r--r--src/compositor-x11.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index c227063..fe147c7 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -762,7 +762,6 @@ x11_compositor_create(struct wl_display *display,
int width, int height, int count, int fullscreen)
{
struct x11_compositor *c;
- struct wl_event_loop *loop;
xcb_screen_iterator_t s;
int i, x;
@@ -808,10 +807,9 @@ x11_compositor_create(struct wl_display *display,
if (x11_input_create(c) < 0)
return NULL;
- loop = wl_display_get_event_loop(c->base.wl_display);
-
c->xcb_source =
- wl_event_loop_add_fd(loop, xcb_get_file_descriptor(c->conn),
+ wl_event_loop_add_fd(c->base.input_loop,
+ xcb_get_file_descriptor(c->conn),
WL_EVENT_READABLE,
x11_compositor_handle_event, c);
wl_event_source_check(c->xcb_source);