diff options
author | dudemanguy <random342@airmail.cc> | 2019-02-27 15:54:23 -0600 |
---|---|---|
committer | wm4 <1387750+wm4@users.noreply.github.com> | 2019-09-21 15:24:06 +0200 |
commit | cdad5cc65f4c6032b284ef6a4ff9874ad4018a63 (patch) | |
tree | 27706966268295b17030f492080a303179d0a2f4 /video | |
parent | 9e304ab974559907790829421a11e26eb2b630e5 (diff) | |
download | mpv-cdad5cc65f4c6032b284ef6a4ff9874ad4018a63.tar.bz2 mpv-cdad5cc65f4c6032b284ef6a4ff9874ad4018a63.tar.xz |
wayland: don't show cursor when fullscreening
Diffstat (limited to 'video')
-rw-r--r-- | video/out/wayland_common.c | 6 | ||||
-rw-r--r-- | video/out/wayland_common.h | 1 |
2 files changed, 7 insertions, 0 deletions
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); |