diff options
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r-- | video/out/wayland_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index b3f6e78ccf..5aee33e048 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -382,6 +382,10 @@ static void pointer_handle_enter(void *data, display->cursor.serial = serial; display->cursor.pointer = pointer; + /* Release the left button on pointer enter again + * because after moving the shell surface no release event is sent */ + mplayer_put_key(wl->vo->key_fifo, MP_MOUSE_BTN0); + if (wl->window->type == TYPE_FULLSCREEN) hide_cursor(display); else if (display->cursor.default_cursor) { @@ -431,6 +435,10 @@ static void pointer_handle_button(void *data, mplayer_put_key(wl->vo->key_fifo, MP_MOUSE_BTN0 + (button - BTN_LEFT) | ((state == WL_POINTER_BUTTON_STATE_PRESSED) ? MP_KEY_STATE_DOWN : 0)); + + if ((button == BTN_LEFT) && (state == WL_POINTER_BUTTON_STATE_PRESSED)) + wl_shell_surface_move(wl->window->shell_surface, wl->input->seat, serial); + } static void pointer_handle_axis(void *data, |