From 3f7be59062f00cd99d832eaa5d389b880a3c512e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 14 Jul 2023 12:03:35 +0200 Subject: config: add csd.double-click-to-maximize=no|yes option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When enabled, double-clicking the CSD titlebar will (un)maximize the window. Defaults to ‘yes’ (since this is the old hard-coded behavior). Closes #1293 --- input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'input.c') diff --git a/input.c b/input.c index 3bf6535a..b2b4adf6 100644 --- a/input.c +++ b/input.c @@ -2287,7 +2287,10 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, struct wl_window *win = term->window; /* Toggle maximized state on double-click */ - if (button == BTN_LEFT && seat->mouse.count == 2) { + if (term->conf->csd.double_click_to_maximize && + button == BTN_LEFT && + seat->mouse.count == 2) + { if (win->is_maximized) xdg_toplevel_unset_maximized(win->xdg_toplevel); else -- cgit v1.3