touch: don't segfault when unable to touch

This commit is contained in:
K. Lange 2021-09-08 21:35:09 +09:00
parent 0edb682567
commit d6be1c8757

View File

@ -1129,9 +1129,13 @@ static void mark_window(yutani_globals_t * yg, yutani_server_window_t * window)
* Set a window as closed. It will be removed after rendering has completed.
*/
static void window_mark_for_close(yutani_globals_t * yg, yutani_server_window_t * w) {
if (w->hidden) {
window_actually_close(yg, w);
} else {
w->anim_mode = yutani_pick_animation(w->server_flags, 1);
w->anim_start = yutani_current_time(yg);
}
}
/**
* Remove a window from its owner's child set.