shell: Don't try to switch to a NULL shell surface.
Fixes the crash from alt+tab when there's a fullscreen surface.
This commit is contained in:
committed by
Kristian Høgsberg
parent
db59f9a53f
commit
5031cbe7b4
+3
-10
@@ -5172,10 +5172,9 @@ switcher_next(struct switcher *switcher)
|
|||||||
|
|
||||||
wl_list_for_each(view, &ws->layer.view_list, layer_link) {
|
wl_list_for_each(view, &ws->layer.view_list, layer_link) {
|
||||||
shsurf = get_shell_surface(view->surface);
|
shsurf = get_shell_surface(view->surface);
|
||||||
switch (shsurf->type) {
|
if (shsurf &&
|
||||||
case SHELL_SURFACE_TOPLEVEL:
|
shsurf->type == SHELL_SURFACE_TOPLEVEL &&
|
||||||
if (shsurf->parent)
|
shsurf->parent == NULL) {
|
||||||
break;
|
|
||||||
if (first == NULL)
|
if (first == NULL)
|
||||||
first = view->surface;
|
first = view->surface;
|
||||||
if (prev == switcher->current)
|
if (prev == switcher->current)
|
||||||
@@ -5184,12 +5183,6 @@ switcher_next(struct switcher *switcher)
|
|||||||
view->alpha = 0.25;
|
view->alpha = 0.25;
|
||||||
weston_view_geometry_dirty(view);
|
weston_view_geometry_dirty(view);
|
||||||
weston_surface_damage(view->surface);
|
weston_surface_damage(view->surface);
|
||||||
break;
|
|
||||||
case SHELL_SURFACE_POPUP:
|
|
||||||
case SHELL_SURFACE_XWAYLAND:
|
|
||||||
case SHELL_SURFACE_NONE:
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_black_surface(view->surface, NULL)) {
|
if (is_black_surface(view->surface, NULL)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user