aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-07-14 10:03:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-14 10:03:35 +0000
commit3f7be59062f00cd99d832eaa5d389b880a3c512e (patch)
tree2849470c94e9fc7a7300a60a7542a5e459bf70d8 /input.c
parentthemes: enable custom cursor colors in all themes that define such colors (diff)
config: add csd.double-click-to-maximize=no|yes option
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
Diffstat (limited to 'input.c')
-rw-r--r--input.c5
1 files changed, 4 insertions, 1 deletions
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