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:
Alexander Preisinger 2013-03-11 18:24:12 +01:00
parent b52f3800c2
commit f2debeca66
1 changed files with 8 additions and 0 deletions

View File

@ -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,