desktop-shell: Don't crash on when attemping to switch
Attempting to perform a switch on a surface (already) closed will trip the assert in activate(), so check if we have a weston_desktop_surface before trying to activate it. Fixes #543 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
@@ -4451,7 +4451,7 @@ switcher_destroy(struct switcher *switcher)
|
|||||||
weston_surface_damage(view->surface);
|
weston_surface_damage(view->surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switcher->current) {
|
if (switcher->current && get_shell_surface(switcher->current->surface)) {
|
||||||
activate(switcher->shell, switcher->current,
|
activate(switcher->shell, switcher->current,
|
||||||
keyboard->seat,
|
keyboard->seat,
|
||||||
WESTON_ACTIVATE_FLAG_CONFIGURE);
|
WESTON_ACTIVATE_FLAG_CONFIGURE);
|
||||||
|
|||||||
Reference in New Issue
Block a user