Fix a crash on closing client

This commit is contained in:
David Delarosa 2026-06-02 12:27:23 +03:00
parent 602ff97410
commit cd8e3d9786
2 changed files with 3 additions and 4 deletions

View file

@ -539,7 +539,7 @@ void apply_titlebar(Client *c, int32_t rect_width,
}
void update_titlebar_hover(Client *c) {
if (!c || !c->titlebar_close || !c->titlebar_bg)
if (!c || c->iskilling || !c->titlebar_close || !c->titlebar_bg)
return;
int32_t tb = titlebar_active_height();
if (tb <= 0 || c->isfullscreen) {
@ -569,7 +569,6 @@ void update_titlebar_hover(Client *c) {
wlr_scene_rect_set_color(c->titlebar_close, config.title_close_color);
}
}
}
void apply_border(Client *c) {
if (!c || c->iskilling || !client_surface(c)->mapped)

View file

@ -2427,7 +2427,7 @@ bool handle_buttonpress(struct wlr_pointer_button_event *event) {
cursor->y >= close_y &&
cursor->y < close_y + tb_height - 2 * tb_margin) {
pending_kill_client(c);
return;
return true;
}
grabc = c;
if (grabc->isfloating == 0) {
@ -2440,7 +2440,7 @@ bool handle_buttonpress(struct wlr_pointer_button_event *event) {
set_size_per(grabc->mon, grabc);
}
start_drag_window = true;
return;
return true;
}
}