diff options
author | Daniel Stone <daniels@collabora.com> | 2023-06-19 20:49:18 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2023-06-26 15:49:50 +0000 |
commit | 8255c49a1f7b9530a1fa77ecf0757a9e88fec326 (patch) | |
tree | db8094314444f08758da46705e043f6d6a4c2185 /kiosk-shell | |
parent | 785af26007b804104b2119961d063627170d33ba (diff) |
kiosk-shell: Use weston_view_move_to_layer() for activation
When we're switching between different active surfaces, use the new
weston_view_move_to_layer() helper.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'kiosk-shell')
-rw-r--r-- | kiosk-shell/kiosk-shell.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/kiosk-shell/kiosk-shell.c b/kiosk-shell/kiosk-shell.c index 960c4e91..06ab99d1 100644 --- a/kiosk-shell/kiosk-shell.c +++ b/kiosk-shell/kiosk-shell.c @@ -392,11 +392,8 @@ kiosk_shell_surface_activate(struct kiosk_shell_surface *shsurf, * (currently focused one) on a different output when activating * a new one. */ if (!shsurf->parent && (shsurf->output == current_focus->output)) { - weston_layer_entry_remove(¤t_focus->view->layer_link); - weston_layer_entry_insert(&shsurf->shell->inactive_layer.view_list, - ¤t_focus->view->layer_link); - weston_view_geometry_dirty(current_focus->view); - weston_surface_damage(current_focus->view->surface); + weston_view_move_to_layer(current_focus->view, + &shsurf->shell->inactive_layer.view_list); } } @@ -407,12 +404,8 @@ kiosk_shell_surface_activate(struct kiosk_shell_surface *shsurf, /* removes it from the inactive_layer, on removal of a surface, and * move it back to the normal layer */ - weston_layer_entry_remove(&shsurf->view->layer_link); - weston_layer_entry_insert(&shsurf->shell->normal_layer.view_list, - &shsurf->view->layer_link); - weston_view_geometry_dirty(shsurf->view); - weston_view_update_transform(shsurf->view); - weston_surface_damage(shsurf->view->surface); + weston_view_move_to_layer(shsurf->view, + &shsurf->shell->normal_layer.view_list); } /* |