From 303802498b682aa584a63a81077b61d26f393741 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 8 Feb 2025 20:20:47 +0800 Subject: [PATCH] =?UTF-8?q?unmap=E9=87=8C=E6=A0=87=E8=AE=B0=E5=A5=BD?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E8=A6=81=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 8756d351..f9570296 100644 --- a/main.c +++ b/main.c @@ -1754,7 +1754,7 @@ void client_commit(Client *c) { wlr_output_schedule_frame(c->mon->wlr_output); } -void +void commitnotify(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, commit); @@ -3096,7 +3096,7 @@ minimizenotify(struct wl_listener *listener, void *data) { // wlr_xdg_surface_schedule_configure(c->surface.xdg); // togglefakefullscreen(&(Arg){0}); Client *c = wl_container_of(listener, c, minimize); - + if(!c || c->iskilling) return; @@ -3776,7 +3776,7 @@ void resize(Client *c, struct wlr_box geo, int interact) { set_open_animaiton(c, c->geom); } else { c->animainit_geom = c->animation.current; - } + } if (c->isnoborder || c->iskilling) { c->bw = 0; @@ -4835,6 +4835,8 @@ void unmapnotify(struct wl_listener *listener, void *data) { /* Called when the surface is unmapped, and should no longer be shown. */ Client *c = wl_container_of(listener, c, unmap); + c->iskilling = 1; + if (c == grabc) { cursor_mode = CurNormal; grabc = NULL; @@ -5391,7 +5393,7 @@ void activatex11(struct wl_listener *listener, void *data) { void // 0.7 configurex11(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, configure); - + if(!c || c->iskilling) return; @@ -5522,4 +5524,4 @@ int main(int argc, char *argv[]) { usage: die("Usage: %s [-v] [-d] [-s startup command]", argv[0]); -} \ No newline at end of file +}