Merge branch 'mangowm:wl-only' into wl-only

This commit is contained in:
CtrlLuzzio 2026-06-16 07:32:17 -04:00 committed by GitHub
commit 0b40090ba1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 1 deletions

View file

@ -1,5 +1,5 @@
project('mango', ['c'],
version : '0.14.3',
version : '0.14.4',
)
subdir('protocols')

View file

@ -1223,6 +1223,10 @@ arrange(Monitor *m, bool want_animation, bool from_view) {
if (!m->wlr_output->enabled)
return;
if (!m->sel) {
m->sel = focustop(m);
}
pre_caculate_before_arrange(m, want_animation, from_view, false);
if (m->isoverview) {

View file

@ -565,6 +565,7 @@ void dwindle(Monitor *m) {
break;
}
// 清理树中已不存在的客户端
{
DwindleNode *leaves[512];
int32_t lc = 0;
@ -602,9 +603,14 @@ void dwindle(Monitor *m) {
}
}
// 获得焦点客户端,若为空则用第一个可见平铺客户端兜底
Client *focused = focustop(m);
if (focused && !dwindle_find_leaf(*root, focused))
focused = m->sel;
if (!focused && count > 0)
focused = vis[0];
for (int32_t i = 0; i < count; i++) {
if (!dwindle_find_leaf(*root, vis[i]))
dwindle_insert_with_config(root, vis[i], focused, ratio);