mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Better handling of hidden cursors in wayland backend, add TODOs
This commit is contained in:
parent
92daa790bb
commit
19860c03f7
3 changed files with 12 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue