diff --git a/kick.c b/kick.c index b669179..d5d41d5 100644 --- a/kick.c +++ b/kick.c @@ -3316,7 +3316,11 @@ static void close_window(struct kick_window *w) { /* A black window never fires a toplevel destroy, so drop it from the overlay/cycle immediately; only the escalation timer and the - success-removal paths touch it afterwards. */ + success-removal paths touch it afterwards. Clearing pending_claim + also retires the slot for good: a client connecting inside the grace + period can no longer claim this window (claim matching requires a + pending slot), so it lands on a group/external tab instead and no + graceful close is owed here -- the escalation reaps this window. */ if (!window_live(w)) w->pending_claim = false; @@ -3983,16 +3987,6 @@ static void claim_xdg_window(struct kick_tab *tab, struct kick_window *w, wl_signal_add(&toplevel->events.request_move, &w->request_move); w->request_resize.notify = handle_request_resize; wl_signal_add(&toplevel->events.request_resize, &w->request_resize); - - /* Alt+Delete on a still-black window arms the SIGKILL escalation but has - no surface to ask closed: a client connecting inside the grace period - would otherwise stall with closing=true forever (the escalation - disarms the timer without destroying the now-live window, and the tab - hides from the overlay and cycling). Deliver the missed graceful - close now; the armed timer plus the live-destroy path finish the - teardown. */ - if (w->closing) - window_graceful_close(w); } static void handle_new_toplevel(struct wl_listener *listener, void *data) { @@ -4247,11 +4241,6 @@ static void claim_x11_window(struct kick_tab *tab, struct kick_window *w, /* Expose the X11 window to taskbars (title/class sync via the set_title/set_class handlers below, which call into foreign_sync_*). */ foreign_handle_create(w); - - /* Same late-connect race as claim_xdg_window: a client that associates - inside the Alt+Delete grace period missed its graceful close. */ - if (w->closing) - window_graceful_close(w); } /* --- Managed X11 windows --- */