diff options
-rw-r--r-- | src/layout.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/layout.c b/src/layout.c index a09010c..fd01c5b 100644 --- a/src/layout.c +++ b/src/layout.c @@ -551,6 +551,24 @@ ivi_layout_panel_committed(struct ivi_surface *surface) surface->view->is_mapped = true; } +static bool +ivi_layout_surface_is_split_or_fs(struct ivi_surface *surf) +{ + struct ivi_compositor *ivi = surf->ivi; + struct ivi_surface *is; + + if (surf->role != IVI_SURFACE_ROLE_SPLIT_H && + surf->role != IVI_SURFACE_ROLE_SPLIT_V && + surf->role != IVI_SURFACE_ROLE_FS) + return false; + + wl_list_for_each(is, &ivi->surfaces, link) + if (is == surf) + return true; + + return false; +} + void ivi_layout_activate(struct ivi_output *output, const char *app_id) { @@ -579,9 +597,12 @@ ivi_layout_activate(struct ivi_output *output, const char *app_id) return; } - if (surf == output->active) + /* do not 're'-activate surfaces that are split or active */ + if (surf == output->active || + ivi_layout_surface_is_split_or_fs(surf)) return; + dsurf = surf->dsurface; view = surf->view; geom = weston_desktop_surface_get_geometry(dsurf); |