mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-24 09:06:31 -04:00
opt: remove useless code
This commit is contained in:
parent
9eddc34b57
commit
36c5bcb4fe
3 changed files with 1 additions and 15 deletions
|
|
@ -388,7 +388,7 @@ Client *focustop(Monitor *m) {
|
||||||
|
|
||||||
Client *get_next_stack_client(Client *c, bool reverse) {
|
Client *get_next_stack_client(Client *c, bool reverse) {
|
||||||
if (!c || !c->mon)
|
if (!c || !c->mon)
|
||||||
return NULL; // 添加输入检查
|
return NULL;
|
||||||
|
|
||||||
Client *next = NULL;
|
Client *next = NULL;
|
||||||
if (reverse) {
|
if (reverse) {
|
||||||
|
|
@ -396,11 +396,6 @@ Client *get_next_stack_client(Client *c, bool reverse) {
|
||||||
if (&next->link == &clients)
|
if (&next->link == &clients)
|
||||||
continue; /* wrap past the sentinel node */
|
continue; /* wrap past the sentinel node */
|
||||||
|
|
||||||
if (c->mon->has_visible_fullscreen_client && !next->isfloating &&
|
|
||||||
!next->isfullscreen)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// 添加更安全的 VISIBLEON 检查
|
|
||||||
if (next != c && next->mon && VISIBLEON(next, c->mon))
|
if (next != c && next->mon && VISIBLEON(next, c->mon))
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
@ -409,10 +404,6 @@ Client *get_next_stack_client(Client *c, bool reverse) {
|
||||||
if (&next->link == &clients)
|
if (&next->link == &clients)
|
||||||
continue; /* wrap past the sentinel node */
|
continue; /* wrap past the sentinel node */
|
||||||
|
|
||||||
if (c->mon->has_visible_fullscreen_client && !next->isfloating &&
|
|
||||||
!next->isfullscreen)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (next != c && next->mon && VISIBLEON(next, c->mon))
|
if (next != c && next->mon && VISIBLEON(next, c->mon))
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,6 @@ arrange(Monitor *m, bool want_animation) {
|
||||||
m->visible_clients = 0;
|
m->visible_clients = 0;
|
||||||
m->visible_tiling_clients = 0;
|
m->visible_tiling_clients = 0;
|
||||||
m->visible_scroll_tiling_clients = 0;
|
m->visible_scroll_tiling_clients = 0;
|
||||||
m->has_visible_fullscreen_client = false;
|
|
||||||
|
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
|
|
||||||
|
|
@ -611,9 +610,6 @@ arrange(Monitor *m, bool want_animation) {
|
||||||
if (!c->isunglobal)
|
if (!c->isunglobal)
|
||||||
m->visible_clients++;
|
m->visible_clients++;
|
||||||
|
|
||||||
if (c->isfullscreen)
|
|
||||||
m->has_visible_fullscreen_client = true;
|
|
||||||
|
|
||||||
if (ISTILED(c)) {
|
if (ISTILED(c)) {
|
||||||
m->visible_tiling_clients++;
|
m->visible_tiling_clients++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -505,7 +505,6 @@ struct Monitor {
|
||||||
uint32_t visible_clients;
|
uint32_t visible_clients;
|
||||||
uint32_t visible_tiling_clients;
|
uint32_t visible_tiling_clients;
|
||||||
uint32_t visible_scroll_tiling_clients;
|
uint32_t visible_scroll_tiling_clients;
|
||||||
bool has_visible_fullscreen_client;
|
|
||||||
char last_surface_ws_name[256];
|
char last_surface_ws_name[256];
|
||||||
struct wlr_ext_workspace_group_handle_v1 *ext_group;
|
struct wlr_ext_workspace_group_handle_v1 *ext_group;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue