diff options
author | Alexander Preisinger <alexander.preisinger@gmail.com> | 2013-10-25 10:27:58 +0200 |
---|---|---|
committer | Alexander Preisinger <alexander.preisinger@gmail.com> | 2013-10-25 10:30:12 +0200 |
commit | cb3327fe48a35b20900c9ad47ddf4c17486a1e04 (patch) | |
tree | 36f4fda0ff43f332b2b209cd65ba1cfd5bcb47cd /video/out/wayland_common.c | |
parent | bef2135a44ee07b68fe255c8ae4491b2e45e0895 (diff) | |
download | mpv-cb3327fe48a35b20900c9ad47ddf4c17486a1e04.tar.bz2 mpv-cb3327fe48a35b20900c9ad47ddf4c17486a1e04.tar.xz |
wayland: better name for mouse coordinates
I had to look up what the surf_x and surf_y members do.
That means the name is not very good. Also a comment.
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r-- | video/out/wayland_common.c | 10 |
1 files changed, 5 insertions, 5 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); } |