mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-19 14:33:16 -04:00
Merge branch 'mangowm:wl-only' into wl-only
This commit is contained in:
commit
0b40090ba1
3 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
project('mango', ['c'],
|
project('mango', ['c'],
|
||||||
version : '0.14.3',
|
version : '0.14.4',
|
||||||
)
|
)
|
||||||
|
|
||||||
subdir('protocols')
|
subdir('protocols')
|
||||||
|
|
|
||||||
|
|
@ -1223,6 +1223,10 @@ arrange(Monitor *m, bool want_animation, bool from_view) {
|
||||||
if (!m->wlr_output->enabled)
|
if (!m->wlr_output->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!m->sel) {
|
||||||
|
m->sel = focustop(m);
|
||||||
|
}
|
||||||
|
|
||||||
pre_caculate_before_arrange(m, want_animation, from_view, false);
|
pre_caculate_before_arrange(m, want_animation, from_view, false);
|
||||||
|
|
||||||
if (m->isoverview) {
|
if (m->isoverview) {
|
||||||
|
|
|
||||||
|
|
@ -565,6 +565,7 @@ void dwindle(Monitor *m) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清理树中已不存在的客户端
|
||||||
{
|
{
|
||||||
DwindleNode *leaves[512];
|
DwindleNode *leaves[512];
|
||||||
int32_t lc = 0;
|
int32_t lc = 0;
|
||||||
|
|
@ -602,9 +603,14 @@ void dwindle(Monitor *m) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得焦点客户端,若为空则用第一个可见平铺客户端兜底
|
||||||
Client *focused = focustop(m);
|
Client *focused = focustop(m);
|
||||||
if (focused && !dwindle_find_leaf(*root, focused))
|
if (focused && !dwindle_find_leaf(*root, focused))
|
||||||
focused = m->sel;
|
focused = m->sel;
|
||||||
|
|
||||||
|
if (!focused && count > 0)
|
||||||
|
focused = vis[0];
|
||||||
|
|
||||||
for (int32_t i = 0; i < count; i++) {
|
for (int32_t i = 0; i < count; i++) {
|
||||||
if (!dwindle_find_leaf(*root, vis[i]))
|
if (!dwindle_find_leaf(*root, vis[i]))
|
||||||
dwindle_insert_with_config(root, vis[i], focused, ratio);
|
dwindle_insert_with_config(root, vis[i], focused, ratio);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue