禁止fadeout,实现有问题

This commit is contained in:
DreamMaoMao 2025-02-06 22:53:24 +08:00
parent 97621fe2f6
commit bdd6824ab0

65
main.c
View file

@ -756,10 +756,10 @@ bool client_animation_next_tick(Client *c) {
} }
c->animation.running = false; c->animation.running = false;
if (c->iskilling) { // if (c->iskilling) {
client_send_close(c); // client_send_close(c);
return false; // return false;
} // }
if (c->animation.tagouting) { if (c->animation.tagouting) {
c->animation.tagouting = false; c->animation.tagouting = false;
wlr_scene_node_set_enabled(&c->scene->node, false); wlr_scene_node_set_enabled(&c->scene->node, false);
@ -2888,39 +2888,40 @@ keypressmod(struct wl_listener *listener, void *data) {
} }
void pending_kill_client(Client *c) { void pending_kill_client(Client *c) {
c->iskilling = 1; // c->iskilling = 1;
c->animainit_geom = c->geom; // c->animainit_geom = c->geom;
c->pending = c->geom; // c->pending = c->geom;
c->pending.y = c->geom.y + c->mon->m.height - (c->geom.y - c->mon->m.y); // c->pending.y = c->geom.y + c->mon->m.height - (c->geom.y - c->mon->m.y);
if (c == grabc) { // if (c == grabc) {
cursor_mode = CurNormal; // cursor_mode = CurNormal;
grabc = NULL; // grabc = NULL;
} // }
if (c == selmon->sel) { // if (c == selmon->sel) {
selmon->sel = NULL; // selmon->sel = NULL;
Client *nextfocus = focustop(selmon); // Client *nextfocus = focustop(selmon);
if (nextfocus) { // if (nextfocus) {
focusclient(nextfocus, 0); // focusclient(nextfocus, 0);
} // }
if (!nextfocus && selmon->isoverview) { // if (!nextfocus && selmon->isoverview) {
Arg arg = {0}; // Arg arg = {0};
toggleoverview(&arg); // toggleoverview(&arg);
} // }
} // }
if (c->foreign_toplevel) { // if (c->foreign_toplevel) {
wlr_foreign_toplevel_handle_v1_destroy(c->foreign_toplevel); // wlr_foreign_toplevel_handle_v1_destroy(c->foreign_toplevel);
c->foreign_toplevel = NULL; // c->foreign_toplevel = NULL;
} // }
resize(c, c->geom, 0); // resize(c, c->geom, 0);
printstatus(); // printstatus();
motionnotify(0, NULL, 0, 0, 0, 0); // motionnotify(0, NULL, 0, 0, 0, 0);
arrange(selmon, false); // arrange(selmon, false);
client_send_close(c);
} }
void killclient(const Arg *arg) { void killclient(const Arg *arg) {
@ -4869,6 +4870,8 @@ void unmapnotify(struct wl_listener *listener, void *data) {
/* Called when the surface is unmapped, and should no longer be shown. */ /* Called when the surface is unmapped, and should no longer be shown. */
Client *c = wl_container_of(listener, c, unmap); Client *c = wl_container_of(listener, c, unmap);
c->iskilling = 1;
if (c == grabc) { if (c == grabc) {
cursor_mode = CurNormal; cursor_mode = CurNormal;
grabc = NULL; grabc = NULL;