summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.com>2023-08-18 13:38:38 -0500
committerMarius Vlad <marius.vlad0@gmail.com>2023-09-15 07:00:31 +0000
commit8ac621d67252c1f93c4cc68ee3527e1f3083a50f (patch)
treed0fbf1d6a8c521e3014eef0602a35ee3b21752e5 /desktop-shell
parentdd956e5b8bee2f35cc594cb8d546933c31be8426 (diff)
desktop-shell: Don't try to notice disappearing outputs during fade
This is a trap - it's not harmful to let the animation complete - it is harmful to call weston_shell_utils_curtain_destroy() in mid animation. It results in immediately completing the animation, which attempts to destroy the curtain a second time. Fixes a crash when (on a multi-output system) the display is disconnected during the fade out, then reconnected before the fade-in starts. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index ce92efbc..a4240a70 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3979,15 +3979,7 @@ shell_fade(struct desktop_shell *shell, enum fade_type type)
weston_view_set_alpha(shell->fade.curtain->view, 1.0 - tint);
}
- if (shell->fade.curtain->view->output == NULL) {
- /* If the black view gets a NULL output, we lost the
- * last output and we'll just cancel the fade. This
- * happens when you close the last window under the
- * X11 or Wayland backends. */
- shell->locked = false;
- weston_shell_utils_curtain_destroy(shell->fade.curtain);
- shell->fade.curtain = NULL;
- } else if (shell->fade.animation) {
+ if (shell->fade.animation) {
weston_fade_update(shell->fade.animation, tint);
} else {
shell->fade.animation =