@ -2127,6 +2127,12 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf)
struct weston_view * parent ;
struct weston_view * parent ;
switch ( shsurf - > type ) {
switch ( shsurf - > type ) {
case SHELL_SURFACE_XWAYLAND :
return & shsurf - > shell - > fullscreen_layer . view_list ;
case SHELL_SURFACE_NONE :
return NULL ;
case SHELL_SURFACE_POPUP :
case SHELL_SURFACE_POPUP :
case SHELL_SURFACE_TOPLEVEL :
case SHELL_SURFACE_TOPLEVEL :
if ( shsurf - > state . fullscreen & & ! shsurf - > state . lowered ) {
if ( shsurf - > state . fullscreen & & ! shsurf - > state . lowered ) {
@ -2142,16 +2148,6 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf)
if ( parent )
if ( parent )
return parent - > layer_link . prev ;
return parent - > layer_link . prev ;
}
}
break ;
case SHELL_SURFACE_XWAYLAND :
return & shsurf - > shell - > fullscreen_layer . view_list ;
case SHELL_SURFACE_NONE :
default :
/* Go to the fallback, below. */
break ;
}
/* Move the surface to a normal workspace layer so that surfaces
/* Move the surface to a normal workspace layer so that surfaces
* which were previously fullscreen or transient are no longer
* which were previously fullscreen or transient are no longer
@ -2160,6 +2156,9 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf)
return & ws - > layer . view_list ;
return & ws - > layer . view_list ;
}
}
assert ( 0 & & " Unknown shell surface type " ) ;
}
static void
static void
shell_surface_update_child_surface_layers ( struct shell_surface * shsurf )
shell_surface_update_child_surface_layers ( struct shell_surface * shsurf )
{
{
@ -2198,6 +2197,8 @@ shell_surface_update_layer(struct shell_surface *shsurf)
new_layer_link = shell_surface_calculate_layer_link ( shsurf ) ;
new_layer_link = shell_surface_calculate_layer_link ( shsurf ) ;
if ( new_layer_link = = NULL )
return ;
if ( new_layer_link = = & shsurf - > view - > layer_link )
if ( new_layer_link = = & shsurf - > view - > layer_link )
return ;
return ;