From 0b6195e4b7f34db2539ab9b81e8b452c1780bc27 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 11 Feb 2025 18:40:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dov=E6=A8=A1=E5=BC=8F=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=9A=84=E6=97=B6=E5=80=99scroller=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=BB=9A=E5=8A=A8=E5=88=B0=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 0bf88814..8f9f852d 100644 --- a/main.c +++ b/main.c @@ -4713,8 +4713,8 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) { for (i = 0; i < n; i++) { c = tempClients[i]; if (root_client == c) { - if (selmon->prevsel != NULL && (c->geom.x - m->w.x - scroller_structs) > 0 && - c->geom.x + c->geom.width < m->w.x + m->w.width - scroller_structs) { + if (c->geom.x >= m->w.x + scroller_structs && + c->geom.x + c->geom.width <= m->w.x + m->w.width - scroller_structs) { need_scroller = false; } else { need_scroller = true; @@ -4805,6 +4805,10 @@ void overview_restore(Client *c, const Arg *arg) { c->overview_isfloatingbak = 0; c->overview_isfullscreenbak = 0; c->overview_ismaxmizescreenbak = 0; + c->geom.x = c->overview_backup_x; + c->geom.y = c->overview_backup_y; + c->geom.width = c->overview_backup_w; + c->geom.height = c->overview_backup_h; c->bw = c->overview_backup_bw; c->is_restoring_from_ov = (arg->ui & c->tags & TAGMASK) == 0 ? true : false; if (c->isfloating) { @@ -4921,8 +4925,6 @@ void toggleoverview(const Arg *arg) { } else { wl_list_for_each(c, &clients, link) { if (c && - (c != selmon->sel || c->overview_isfloatingbak || - c->overview_isfullscreenbak || c->overview_ismaxmizescreenbak) && !c->iskilling && client_surface(c)->mapped) overview_restore(c, &(Arg){.ui = target}); }