aboutsummaryrefslogtreecommitdiff
path: root/backend/x11/backend.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-15 11:11:00 +0200
committerGitHub <noreply@github.com>2018-04-15 11:11:00 +0200
commit1db8667ceaef0e73b0937c277ad16268429ff4c5 (patch)
tree020a27e79253fc18d03738d53b3abdbfb4d06cb5 /backend/x11/backend.c
parent63763d327969a17af43ccaf8fe4c6da941f8efcb (diff)
parente79d924588523732d13b582a46962246c8a9670d (diff)
Merge pull request #869 from psychon/x11-cleanups
Some changes to the x11 backend
Diffstat (limited to 'backend/x11/backend.c')
-rw-r--r--backend/x11/backend.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index 02f5ef6f..089b3822 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -65,18 +65,16 @@ void x11_output_layout_get_box(struct wlr_x11_backend *backend,
box->height = max_y - min_y;
}
-static bool handle_x11_event(struct wlr_x11_backend *x11,
+static void handle_x11_event(struct wlr_x11_backend *x11,
xcb_generic_event_t *event) {
- if (x11_handle_input_event(x11, event)) {
- return false;
- }
+ x11_handle_input_event(x11, event);
switch (event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) {
case XCB_EXPOSE: {
xcb_expose_event_t *ev = (xcb_expose_event_t *)event;
struct wlr_x11_output *output =
x11_output_from_window_id(x11, ev->window);
- if (output != NULL) {
+ if (output != NULL && !output->wlr_output.frame_pending) {
wlr_output_send_frame(&output->wlr_output);
}
break;
@@ -103,8 +101,6 @@ static bool handle_x11_event(struct wlr_x11_backend *x11,
break;
}
}
-
- return false;
}
static int x11_event(int fd, uint32_t mask, void *data) {
@@ -117,11 +113,8 @@ static int x11_event(int fd, uint32_t mask, void *data) {
xcb_generic_event_t *e;
while ((e = xcb_poll_for_event(x11->xcb_conn))) {
- bool quit = handle_x11_event(x11, e);
+ handle_x11_event(x11, e);
free(e);
- if (quit) {
- break;
- }
}
return 0;