From fd008285671c56e1303110461ac6211f778050f4 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 26 Oct 2025 18:10:48 +0800 Subject: [PATCH 1/4] update readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index eb7b29a..e6294a6 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ Scroller Layout https://github.com/user-attachments/assets/c9bf9415-fad1-4400-bcdc-3ad2d76de85a +Layer animaiton + +https://github.com/user-attachments/assets/014c893f-115c-4ae9-8342-f9ae3e9a0df0 + + +# Our discord +[mangowc](https://discord.gg/CPjbDxesh5) + # Supported layouts - tile From 2d3b89e23db43dee190f76a4b86f15a745633236 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 26 Oct 2025 15:38:19 +0800 Subject: [PATCH 2/4] opt: only find same monitor when find same x and same y client --- src/fetch/client.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/fetch/client.h b/src/fetch/client.h index 961aac3..24b0baf 100644 --- a/src/fetch/client.h +++ b/src/fetch/client.h @@ -150,7 +150,7 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating, // 第一次遍历,计算客户端数量 wl_list_for_each(c, &clients, link) { if (c && (findfloating || !c->isfloating) && !c->isunglobal && - (focus_cross_monitor || c->mon == selmon) && + (focus_cross_monitor || c->mon == tc->mon) && (c->tags & c->mon->tagset[c->mon->seltags])) { last++; } @@ -171,7 +171,7 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating, last = -1; wl_list_for_each(c, &clients, link) { if (c && (findfloating || !c->isfloating) && !c->isunglobal && - (focus_cross_monitor || c->mon == selmon) && + (focus_cross_monitor || c->mon == tc->mon) && (c->tags & c->mon->tagset[c->mon->seltags])) { last++; tempClients[last] = c; @@ -187,7 +187,8 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating, case UP: for (int _i = 0; _i <= last; _i++) { if (tempClients[_i]->geom.y < sel_y && - tempClients[_i]->geom.x == sel_x) { + tempClients[_i]->geom.x == sel_x && + tempClients[_i]->mon == tc->mon) { int dis_x = tempClients[_i]->geom.x - sel_x; int dis_y = tempClients[_i]->geom.y - sel_y; long long int tmp_distance = @@ -216,7 +217,8 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating, case DOWN: for (int _i = 0; _i <= last; _i++) { if (tempClients[_i]->geom.y > sel_y && - tempClients[_i]->geom.x == sel_x) { + tempClients[_i]->geom.x == sel_x && + tempClients[_i]->mon == tc->mon) { int dis_x = tempClients[_i]->geom.x - sel_x; int dis_y = tempClients[_i]->geom.y - sel_y; long long int tmp_distance = @@ -245,7 +247,8 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating, case LEFT: for (int _i = 0; _i <= last; _i++) { if (tempClients[_i]->geom.x < sel_x && - tempClients[_i]->geom.y == sel_y) { + tempClients[_i]->geom.y == sel_y && + tempClients[_i]->mon == tc->mon) { int dis_x = tempClients[_i]->geom.x - sel_x; int dis_y = tempClients[_i]->geom.y - sel_y; long long int tmp_distance = @@ -274,7 +277,8 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating, case RIGHT: for (int _i = 0; _i <= last; _i++) { if (tempClients[_i]->geom.x > sel_x && - tempClients[_i]->geom.y == sel_y) { + tempClients[_i]->geom.y == sel_y && + tempClients[_i]->mon == tc->mon) { int dis_x = tempClients[_i]->geom.x - sel_x; int dis_y = tempClients[_i]->geom.y - sel_y; long long int tmp_distance = From 9b5f05e718652781ad9c92ccfd808c1f11e7d975 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 27 Oct 2025 12:29:41 +0800 Subject: [PATCH 3/4] opt: delay 1ms before exit when mmsg send request --- mmsg/mmsg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mmsg/mmsg.c b/mmsg/mmsg.c index ae9270d..7f406d5 100644 --- a/mmsg/mmsg.c +++ b/mmsg/mmsg.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -373,6 +374,7 @@ static void dwl_ipc_output_frame(void *data, dispatch_arg3, dispatch_arg4, dispatch_arg5); } wl_display_flush(display); + usleep(1000); exit(0); } else { if (tflag) { From 31f376f9987d232fbf5be1296f76f00966fce124 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 27 Oct 2025 12:46:04 +0800 Subject: [PATCH 4/4] opt: allow switch focus between fullscreen and floating window in focusstack --- src/dispatch/bind_define.h | 2 +- src/fetch/client.h | 6 ++++++ src/layout/arrange.h | 5 +++++ src/mango.c | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index a39dd3b..343a1cc 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -213,7 +213,7 @@ int focusstack(const Arg *arg) { Client *sel = focustop(selmon); Client *tc = NULL; - if (!sel || (sel->isfullscreen && !client_has_children(sel))) + if (!sel) return 0; if (arg->i == NEXT) { tc = get_next_stack_client(sel, false); diff --git a/src/fetch/client.h b/src/fetch/client.h index 24b0baf..609caa0 100644 --- a/src/fetch/client.h +++ b/src/fetch/client.h @@ -343,11 +343,17 @@ Client *get_next_stack_client(Client *c, bool reverse) { Client *next = NULL; if (reverse) { wl_list_for_each_reverse(next, &c->link, link) { + if (c->mon->has_visible_fullscreen_client && !next->isfloating && + !next->isfullscreen) + continue; if (VISIBLEON(next, c->mon) && next != c) return next; } } else { wl_list_for_each(next, &c->link, link) { + if (c->mon->has_visible_fullscreen_client && !next->isfloating && + !next->isfullscreen) + continue; if (VISIBLEON(next, c->mon) && next != c) return next; } diff --git a/src/layout/arrange.h b/src/layout/arrange.h index 18d6b15..c7935a9 100644 --- a/src/layout/arrange.h +++ b/src/layout/arrange.h @@ -592,6 +592,7 @@ arrange(Monitor *m, bool want_animation) { return; m->visible_clients = 0; m->visible_tiling_clients = 0; + m->has_visible_fullscreen_client = false; wl_list_for_each(c, &clients, link) { @@ -603,6 +604,10 @@ arrange(Monitor *m, bool want_animation) { if (VISIBLEON(c, m)) { m->visible_clients++; + + if (c->isfullscreen) + m->has_visible_fullscreen_client = true; + if (ISTILED(c)) { m->visible_tiling_clients++; } diff --git a/src/mango.c b/src/mango.c index 031da32..274e8f1 100644 --- a/src/mango.c +++ b/src/mango.c @@ -440,6 +440,7 @@ struct Monitor { int asleep; unsigned int visible_clients; unsigned int visible_tiling_clients; + bool has_visible_fullscreen_client; char last_surface_ws_name[256]; struct wlr_ext_workspace_group_handle_v1 *ext_group; }; @@ -4469,7 +4470,6 @@ void setfullscreen(Client *c, int fullscreen) // 用自定义全屏代理自带 wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层 resize(c, c->mon->m, 1); c->isfullscreen = 1; - // c->isfloating = 0; } else { c->bw = c->isnoborder ? 0 : borderpx; c->isfullscreen = 0;