From cdad5cc65f4c6032b284ef6a4ff9874ad4018a63 Mon Sep 17 00:00:00 2001 From: dudemanguy Date: Wed, 27 Feb 2019 15:54:23 -0600 Subject: wayland: don't show cursor when fullscreening --- video/out/wayland_common.c | 6 ++++++ video/out/wayland_common.h | 1 + 2 files changed, 7 insertions(+) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 4a9895520b..34adac5bd1 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -116,7 +116,12 @@ static void pointer_handle_motion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { struct vo_wayland_state *wl = data; + if (!wl->prev_fullscreen && wl->fullscreen) { + wl->prev_fullscreen = wl->fullscreen; + return; + } + wl->prev_fullscreen = wl->fullscreen; wl->mouse_x = wl_fixed_to_int(sx) * wl->scaling; wl->mouse_y = wl_fixed_to_int(sy) * wl->scaling; @@ -1019,6 +1024,7 @@ int vo_wayland_init(struct vo *vo) .wakeup_pipe = {-1, -1}, .dnd_fd = -1, .cursor_visible = true, + .prev_fullscreen = vo->opts->fullscreen, }; wl_list_init(&wl->output_list); diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index 735b312e97..b9ce1c53ce 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -102,6 +102,7 @@ struct vo_wayland_state { struct wl_surface *cursor_surface; int allocated_cursor_scale; bool cursor_visible; + bool prev_fullscreen; }; int vo_wayland_init(struct vo *vo); -- cgit v1.2.3