diff options
author | 2024-11-27 13:42:26 +0200 | |
---|---|---|
committer | 2024-11-27 17:38:47 +0200 | |
commit | 57099d32dfa32464563bfba462f37b3a032b1115 (patch) | |
tree | 96905b122f13027587a780376697e87b68aa496e | |
parent | c8f26648ef9ed09ca842fd81202802b73a07f789 (diff) |
layout: Move the logging and activation at first mapping
We'll spam the journalctl and send continuous events that we have been
activated so let's move than when we only map the application.
Everything else stays the same.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I0843d6b3b53d89e38f7cfd3ab42fa842bb30c144
-rw-r--r-- | src/layout.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/layout.c b/src/layout.c index 8950ac5..12c3524 100644 --- a/src/layout.c +++ b/src/layout.c @@ -381,7 +381,7 @@ ivi_layout_activate_complete(struct ivi_output *output, if (output->active) { /* keep the background surface mapped at all times */ if (output->active->role != IVI_SURFACE_ROLE_BACKGROUND && - !output->active->sticky) { + !output->active->sticky && output->active != surf) { weston_surface_unmap(output->active->view->surface); weston_view_move_to_layer(output->active->view, NULL); } @@ -408,12 +408,19 @@ ivi_layout_activate_complete(struct ivi_output *output, if (!weston_surface_is_mapped(view->surface)) { weston_surface_map(view->surface); weston_view_move_to_layer(view, &ivi->normal.view_list); + + weston_log("Activation completed for app_id %s, role %s, output %s\n", + app_id, + ivi_layout_get_surface_role_name(surf), output->name); + + shell_send_app_state(ivi, app_id, AGL_SHELL_APP_STATE_ACTIVATED); + + if (ivi_seat) + ivi_shell_activate_surface(surf, ivi_seat, WESTON_ACTIVATE_FLAG_NONE); } else { weston_view_update_transform(view); } - if (ivi_seat) - ivi_shell_activate_surface(surf, ivi_seat, WESTON_ACTIVATE_FLAG_NONE); /* * the 'remote' role now makes use of this part so make sure we don't @@ -425,12 +432,6 @@ ivi_layout_activate_complete(struct ivi_output *output, surf->desktop.last_output = surf->desktop.pending_output; surf->desktop.pending_output = NULL; } - - weston_log("Activation completed for app_id %s, role %s, output %s\n", - app_id, - ivi_layout_get_surface_role_name(surf), output->name); - - shell_send_app_state(ivi, app_id, AGL_SHELL_APP_STATE_ACTIVATED); } static bool |