From 88699811152ed30ceda3259ada4a793903bd0f60 Mon Sep 17 00:00:00 2001 From: ernestoCruz05 Date: Sat, 9 May 2026 12:24:50 +0100 Subject: [PATCH] chage from dwindle_smart_drop to dwindle_drop_simple_split, default is 0 (disabled), change to 1 in config to enable typical dwindle splitting --- src/animation/client.h | 4 ++-- src/config/parse_config.h | 11 ++++++----- src/mango.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/animation/client.h b/src/animation/client.h index 97f0d6cd..ba48959d 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -540,8 +540,8 @@ void client_set_drop_area(Client *c) { const Layout *cur_layout = c->mon ? c->mon->pertag->ltidxs[c->mon->pertag->curtag] : NULL; - bool dwindle_familiar = - cur_layout && cur_layout->id == DWINDLE && !config.dwindle_smart_drop; + bool dwindle_familiar = cur_layout && cur_layout->id == DWINDLE && + config.dwindle_drop_simple_split; // 中心区域:x和y都在30%~70%之间 → 无方向 if (rel_x > client_width * 0.3 && rel_x < client_width * 0.7 && diff --git a/src/config/parse_config.h b/src/config/parse_config.h index 8d4300b6..ceaec81c 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -248,7 +248,7 @@ typedef struct { int32_t dwindle_preserve_split; int32_t dwindle_smart_split; int32_t dwindle_smart_resize; - int32_t dwindle_smart_drop; + int32_t dwindle_drop_simple_split; float dwindle_split_ratio; uint32_t hotarea_size; @@ -1634,8 +1634,8 @@ bool parse_option(Config *config, char *key, char *value) { config->dwindle_smart_split = atoi(value); } else if (strcmp(key, "dwindle_smart_resize") == 0) { config->dwindle_smart_resize = atoi(value); - } else if (strcmp(key, "dwindle_smart_drop") == 0) { - config->dwindle_smart_drop = atoi(value); + } else if (strcmp(key, "dwindle_drop_simple_split") == 0) { + config->dwindle_drop_simple_split = atoi(value); } else if (strcmp(key, "dwindle_split_ratio") == 0) { config->dwindle_split_ratio = atof(value); } else if (strcmp(key, "hotarea_size") == 0) { @@ -3208,7 +3208,8 @@ void override_config(void) { CLAMP_INT(config.dwindle_preserve_split, 0, 1); config.dwindle_smart_split = CLAMP_INT(config.dwindle_smart_split, 0, 1); config.dwindle_smart_resize = CLAMP_INT(config.dwindle_smart_resize, 0, 1); - config.dwindle_smart_drop = CLAMP_INT(config.dwindle_smart_drop, 0, 1); + config.dwindle_drop_simple_split = + CLAMP_INT(config.dwindle_drop_simple_split, 0, 1); config.dwindle_split_ratio = CLAMP_FLOAT(config.dwindle_split_ratio, 0.05f, 0.95f); config.hotarea_size = CLAMP_INT(config.hotarea_size, 1, 1000); @@ -3355,7 +3356,7 @@ void set_value_default() { config.dwindle_preserve_split = 0; config.dwindle_smart_split = 0; config.dwindle_smart_resize = 0; - config.dwindle_smart_drop = 1; + config.dwindle_drop_simple_split = 0; config.dwindle_split_ratio = 0.5f; config.log_level = WLR_ERROR; diff --git a/src/mango.c b/src/mango.c index d518fbbf..7463262c 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2229,7 +2229,7 @@ void place_drag_tile_client(Client *c) { closest->drop_direction == RIGHT); dwindle_insert(&c->mon->pertag->dwindle_root[tag], c, closest, config.dwindle_split_ratio, insert_before, split_h, - config.dwindle_smart_drop); + !config.dwindle_drop_simple_split); setfloating(c, 0); return; }