mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-09 23:50:21 -04:00
chage from dwindle_smart_drop to dwindle_drop_simple_split, default is 0 (disabled), change to 1 in config to enable typical dwindle splitting
This commit is contained in:
parent
f535332ee8
commit
8869981115
3 changed files with 9 additions and 8 deletions
|
|
@ -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 &&
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue