mirror of https://github.com/mpv-player/mpv
wayland: move window by grabing it
Because the are no server-side-decorations in the available wayland compositors use grabbing the surface to move it.
This commit is contained in:
parent
b52f3800c2
commit
f2debeca66
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue