opt: remove useless code
This commit is contained in:
@@ -388,7 +388,7 @@ Client *focustop(Monitor *m) {
|
||||
|
||||
Client *get_next_stack_client(Client *c, bool reverse) {
|
||||
if (!c || !c->mon)
|
||||
return NULL; // 添加输入检查
|
||||
return NULL;
|
||||
|
||||
Client *next = NULL;
|
||||
if (reverse) {
|
||||
@@ -396,11 +396,6 @@ Client *get_next_stack_client(Client *c, bool reverse) {
|
||||
if (&next->link == &clients)
|
||||
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))
|
||||
return next;
|
||||
}
|
||||
@@ -409,10 +404,6 @@ Client *get_next_stack_client(Client *c, bool reverse) {
|
||||
if (&next->link == &clients)
|
||||
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))
|
||||
return next;
|
||||
}
|
||||
|
||||
@@ -597,7 +597,6 @@ arrange(Monitor *m, bool want_animation) {
|
||||
m->visible_clients = 0;
|
||||
m->visible_tiling_clients = 0;
|
||||
m->visible_scroll_tiling_clients = 0;
|
||||
m->has_visible_fullscreen_client = false;
|
||||
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
|
||||
@@ -611,9 +610,6 @@ arrange(Monitor *m, bool want_animation) {
|
||||
if (!c->isunglobal)
|
||||
m->visible_clients++;
|
||||
|
||||
if (c->isfullscreen)
|
||||
m->has_visible_fullscreen_client = true;
|
||||
|
||||
if (ISTILED(c)) {
|
||||
m->visible_tiling_clients++;
|
||||
}
|
||||
|
||||
@@ -508,7 +508,6 @@ struct Monitor {
|
||||
uint32_t visible_clients;
|
||||
uint32_t visible_tiling_clients;
|
||||
uint32_t visible_scroll_tiling_clients;
|
||||
bool has_visible_fullscreen_client;
|
||||
struct wlr_scene_optimized_blur *blur;
|
||||
char last_surface_ws_name[256];
|
||||
struct wlr_ext_workspace_group_handle_v1 *ext_group;
|
||||
|
||||
Reference in New Issue
Block a user