aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-01-29 10:06:16 +0100
committerSimon Ser <contact@emersion.fr>2021-02-03 15:22:36 +0100
commit8e27418dd31a797880172b3a811160b64a40b68c (patch)
tree2c4f6d1dc25c81720178e95f53405e7e86eca9e6 /backend
parenta39dc1f7a894b2ee761ae01af836e9b36b207928 (diff)
backend/wayland: flush remote display
It turns out wl_event_source_check is not enough to guarantee that the remote wl_display will be flushed after we queue requests. We need to explicitly flush, just like we do in our X11 code. References: https://gitlab.freedesktop.org/wayland/wayland/-/issues/187
Diffstat (limited to 'backend')
-rw-r--r--backend/wayland/backend.c1
-rw-r--r--backend/wayland/output.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
index f2ce6947..d5cd7b16 100644
--- a/backend/wayland/backend.c
+++ b/backend/wayland/backend.c
@@ -324,6 +324,7 @@ static void backend_destroy(struct wlr_backend *backend) {
xdg_wm_base_destroy(wl->xdg_wm_base);
wl_compositor_destroy(wl->compositor);
wl_registry_destroy(wl->registry);
+ wl_display_flush(wl->remote_display);
wl_display_disconnect(wl->remote_display);
free(wl);
}
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index df8403ba..2955d6bd 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -360,6 +360,8 @@ static bool output_commit(struct wlr_output *wlr_output) {
}
}
+ wl_display_flush(output->backend->remote_display);
+
return true;
}
@@ -460,6 +462,7 @@ static bool output_set_cursor(struct wlr_output *wlr_output,
}
update_wl_output_cursor(output);
+ wl_display_flush(backend->remote_display);
return true;
}
@@ -494,6 +497,7 @@ static void output_destroy(struct wlr_output *wlr_output) {
xdg_toplevel_destroy(output->xdg_toplevel);
xdg_surface_destroy(output->xdg_surface);
wl_surface_destroy(output->surface);
+ wl_display_flush(output->backend->remote_display);
free(output);
}
@@ -679,6 +683,7 @@ void wlr_wl_output_set_title(struct wlr_output *output, const char *title) {
}
xdg_toplevel_set_title(wl_output->xdg_toplevel, title);
+ wl_display_flush(wl_output->backend->remote_display);
}
struct wl_surface *wlr_wl_output_get_surface(struct wlr_output *output) {