aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/wayland/output.c10
-rw-r--r--types/wlr_output.c4
-rw-r--r--types/wlr_surface.c3
3 files changed, 12 insertions, 5 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 2616b347..d308b907 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -66,8 +66,12 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
}
if (!buf) {
// Hide cursor
- wl_pointer_set_cursor(output->backend->pointer, output->enter_serial,
- NULL, 0, 0);
+ wl_surface_destroy(output->cursor_surface);
+ munmap(output->cursor_data, output->cursor_buf_size);
+ output->cursor_surface = NULL;
+ output->cursor_buf_size = 0;
+ wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x,
+ hotspot_y);
return true;
}
@@ -160,7 +164,7 @@ static void wlr_wl_output_destroy(struct wlr_output *_output) {
void wlr_wl_output_update_cursor(struct wlr_wl_backend_output *output,
uint32_t serial, int32_t hotspot_x, int32_t hotspot_y) {
- if (output->cursor_surface && output->backend->pointer && serial) {
+ if (output->backend->pointer && serial) {
wl_pointer_set_cursor(output->backend->pointer, serial,
output->cursor_surface, hotspot_x, hotspot_y);
}
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 568ea093..b416f9de 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -259,7 +259,9 @@ void wlr_output_set_cursor_surface(struct wlr_output *output,
wl_signal_add(&surface->events.commit, &output->cursor.surface_commit);
wl_signal_add(&surface->events.destroy,
&output->cursor.surface_destroy);
- commit_cursor_surface(output, surface);
+ // TODO: doing it breaks GTK apps
+ // TODO: not doing it breaks weston-subsurfaces
+ //commit_cursor_surface(output, surface);
} else {
set_cursor(output, NULL, 0, 0, 0, hotspot_x, hotspot_y);
}
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index a5760d67..b3cdb809 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -429,7 +429,8 @@ static void wlr_surface_commit_pending(struct wlr_surface *surface) {
// Release the buffer after calling commit, because some listeners
// might need it (e.g. for cursor surfaces)
- wlr_surface_state_release_buffer(surface->current);
+ // TODO: breaks weston-subsurfaces
+ //wlr_surface_state_release_buffer(surface->current);
}
static bool wlr_subsurface_is_synchronized(struct wlr_subsurface *subsurface) {