aboutsummaryrefslogtreecommitdiff
path: root/wayland.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-29 11:52:55 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-29 11:56:04 +0000
commit43b07b122a1fa460bdda3edc529726e3b6a6463d (patch)
tree860825ca093fc4db1e58634ebc8acf4cb9442700 /wayland.c
parentwayland: remove all usages of wayl_terminal_from_surface() (diff)
input: csd: add a small delay before initiating a move
This ensures the user has time to double-click to toggle the maximized state.
Diffstat (limited to 'wayland.c')
-rw-r--r--wayland.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wayland.c b/wayland.c
index 5d3a30df..7322a32f 100644
--- a/wayland.c
+++ b/wayland.c
@@ -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().