X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fshell.c;h=c29d89eabf2416548536d961735f1be1bd8b25bf;hb=ec6f2d31293d8680a1f6dab8f53949b848bbae08;hp=3ef24eff4d1dd4ff6a9363a57f97f305c9c4c006;hpb=bf7c3de795a3d80cb78b8fd5b8640a564fa0155d;p=src%2Fagl-compositor.git diff --git a/src/shell.c b/src/shell.c index 3ef24ef..c29d89e 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1,5 +1,5 @@ /* - * Copyright © 2019, 2022 Collabora, Ltd. + * Copyright © 2019, 2022, 2024 Collabora, Ltd. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -1103,6 +1103,7 @@ void remove_black_curtain(struct ivi_output *output) { struct weston_view *view; + struct weston_surface *wsurface; if ((!output && !output->fullscreen_view.fs && @@ -1113,17 +1114,13 @@ remove_black_curtain(struct ivi_output *output) } view = output->fullscreen_view.fs->view; + wsurface = view->surface; assert(view->is_mapped == true || view->surface->is_mapped == true); - view->is_mapped = false; - view->surface->is_mapped = false; - - weston_layer_entry_remove(&view->layer_link); - weston_view_update_transform(view); - - weston_view_damage_below(view); + weston_surface_unmap(wsurface); + weston_view_move_to_layer(view, NULL); weston_log("Removed black curtain from output %s\n", output->output->name); } @@ -1131,6 +1128,7 @@ void insert_black_curtain(struct ivi_output *output) { struct weston_view *view; + struct weston_surface *wsurface; if ((!output && !output->fullscreen_view.fs && @@ -1141,19 +1139,12 @@ insert_black_curtain(struct ivi_output *output) } view = output->fullscreen_view.fs->view; + wsurface = view->surface; if (view->is_mapped || view->surface->is_mapped) return; - weston_layer_entry_remove(&view->layer_link); - weston_layer_entry_insert(&output->ivi->fullscreen.view_list, - &view->layer_link); - - view->is_mapped = true; - view->surface->is_mapped = true; - - weston_view_update_transform(view); - weston_view_damage_below(view); - + weston_surface_map(wsurface); + weston_view_move_to_layer(view, &output->ivi->fullscreen.view_list); weston_log("Added black curtain to output %s\n", output->output->name); }