mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-12 08:21:02 -04:00
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:
parent
c917a74f48
commit
43b07b122a
3 changed files with 43 additions and 5 deletions
|
|
@ -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().
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue