summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/wayland_common.c6
-rw-r--r--video/out/wayland_common.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 07d5317ba6..1665919465 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -155,7 +155,10 @@ static void pointer_handle_motion(void *data, struct wl_pointer *pointer,
wl->mouse_unscaled_x = sx;
wl->mouse_unscaled_y = sy;
- mp_input_set_mouse_pos(wl->vo->input_ctx, wl->mouse_x, wl->mouse_y);
+ if (!wl->state_changed) {
+ mp_input_set_mouse_pos(wl->vo->input_ctx, wl->mouse_x, wl->mouse_y);
+ }
+ wl->state_changed = false;
}
static void window_move(struct vo_wayland_state *wl, uint32_t serial)
@@ -1030,6 +1033,7 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
mp_rect_w(wl->geometry)*wl->scaling, mp_rect_h(wl->geometry)*wl->scaling);
wl->pending_vo_events |= VO_EVENT_RESIZE;
+ wl->state_changed = true;
}
static void handle_toplevel_close(void *data, struct xdg_toplevel *xdg_toplevel)
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index 31e75c4331..895db3393d 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -75,6 +75,7 @@ struct vo_wayland_state {
int reduced_height;
bool configured;
bool frame_wait;
+ bool state_changed;
int wakeup_pipe[2];
int pending_vo_events;
int mouse_x;