mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-25 21:37:33 -04:00
feat: dwindle layout support
This commit is contained in:
parent
cfc7773dfa
commit
73ed3ce35b
6 changed files with 550 additions and 3 deletions
|
|
@ -488,6 +488,21 @@ void resize_tile_master_vertical(Client *grabc, bool isdrag, int32_t offsetx,
|
|||
}
|
||||
}
|
||||
|
||||
void resize_tile_dwindle(Client *grabc, bool isdrag, int32_t offsetx,
|
||||
int32_t offsety, uint32_t time, bool isvertical) {
|
||||
|
||||
if (!isdrag) {
|
||||
dwindle_resize_client_step(grabc->mon, grabc, offsetx, offsety);
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_apply_drap_time == 0 ||
|
||||
time - last_apply_drap_time > config.drag_tile_refresh_interval) {
|
||||
dwindle_resize_client(grabc->mon, grabc);
|
||||
last_apply_drap_time = time;
|
||||
}
|
||||
}
|
||||
|
||||
void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx,
|
||||
int32_t offsety, uint32_t time, bool isvertical) {
|
||||
Client *tc = NULL;
|
||||
|
|
@ -706,6 +721,8 @@ void resize_tile_client(Client *grabc, bool isdrag, int32_t offsetx,
|
|||
resize_tile_scroller(grabc, isdrag, offsetx, offsety, time, false);
|
||||
} else if (current_layout->id == VERTICAL_SCROLLER) {
|
||||
resize_tile_scroller(grabc, isdrag, offsetx, offsety, time, true);
|
||||
} else if (current_layout->id == DWINDLE) {
|
||||
resize_tile_dwindle(grabc, isdrag, offsetx, offsety, time, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue