mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-06 00:06:43 -04:00
Fix a crash on closing client
This commit is contained in:
parent
602ff97410
commit
cd8e3d9786
2 changed files with 3 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue