From 4daab9e4d54dd4f2ef4347d0b440cc27b9feb263 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 14 Jun 2026 21:40:17 +0800 Subject: [PATCH] opt: optimzie client layer judge in overveiw --- src/fetch/common.h | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/fetch/common.h b/src/fetch/common.h index f58bd33a..acb5d0e8 100644 --- a/src/fetch/common.h +++ b/src/fetch/common.h @@ -160,11 +160,26 @@ void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc, if (pl) *pl = l; - if (selmon && selmon->isoverview && (!l || layer_ignores_focus(l))) { + if (selmon && selmon->isoverview && config.ov_no_resize) { ovc = xytoclient(x, y); - if (pc) - *pc = ovc; - if (psurface && ovc) - *psurface = client_surface(ovc); + + bool is_below = false; + if (l && l->layer_surface) { + is_below = (l->layer_surface->current.layer == + ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND || + l->layer_surface->current.layer == + ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM); + } + + if (ovc && (!l || layer_ignores_focus(l) || is_below)) { + if (pc) + *pc = ovc; + + if (psurface) + *psurface = ovc ? client_surface(ovc) : NULL; + + if (pl && ovc) + *pl = NULL; + } } } \ No newline at end of file