diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/out/wayland_common.c | 10 | ||||
-rw-r--r-- | video/out/wayland_common.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 239e57519b..710dbd44c4 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -337,11 +337,11 @@ static void pointer_handle_motion(void *data, struct vo_wayland_state *wl = data; wl->cursor.pointer = pointer; - wl->window.surf_x = wl_fixed_to_int(sx_w); - wl->window.surf_y = wl_fixed_to_int(sy_w); + wl->window.mouse_x = wl_fixed_to_int(sx_w); + wl->window.mouse_y = wl_fixed_to_int(sy_w); - vo_mouse_movement(wl->vo, wl->window.surf_x, - wl->window.surf_y); + vo_mouse_movement(wl->vo, wl->window.mouse_x, + wl->window.mouse_y); } static void pointer_handle_button(void *data, @@ -357,7 +357,7 @@ static void pointer_handle_button(void *data, ((state == WL_POINTER_BUTTON_STATE_PRESSED) ? MP_KEY_STATE_DOWN : MP_KEY_STATE_UP)); - if (!mp_input_test_dragging(wl->vo->input_ctx, wl->window.surf_x, wl->window.surf_y) && + if (!mp_input_test_dragging(wl->vo->input_ctx, wl->window.mouse_x, wl->window.mouse_y) && (button == BTN_LEFT) && (state == WL_POINTER_BUTTON_STATE_PRESSED)) wl_shell_surface_move(wl->window.shell_surface, wl->input.seat, serial); } diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index 956069707a..30fc9b72d2 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -73,8 +73,8 @@ struct vo_wayland_state { bool is_fullscreen; // don't keep aspect ratio in fullscreen mode struct wl_surface *surface; - int32_t surf_x; - int32_t surf_y; + int32_t mouse_x; // mouse position inside the surface + int32_t mouse_y; struct wl_shell_surface *shell_surface; int events; /* mplayer events (VO_EVENT_RESIZE) */ } window; |