input: csd: add a small delay before initiating a move

This ensures the user has time to double-click to toggle the maximized
state.
This commit is contained in:
Daniel Eklöf 2020-02-29 12:52:55 +01:00
parent c917a74f48
commit 43b07b122a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 43 additions and 5 deletions

View file

@ -1014,6 +1014,7 @@ wayl_win_init(struct terminal *term)
struct wl_window *win = calloc(1, sizeof(*win));
win->term = term;
win->use_csd = CSD_UNKNOWN;
win->csd.move_timeout_fd = -1;
win->surface = wl_compositor_create_surface(wayl->compositor);
if (win->surface == NULL) {
@ -1072,6 +1073,9 @@ wayl_win_destroy(struct wl_window *win)
if (win == NULL)
return;
if (win->csd.move_timeout_fd != -1)
close(win->csd.move_timeout_fd);
/*
* First, unmap all surfaces to trigger things like
* keyboard_leave() and wl_pointer_leave().