summaryrefslogtreecommitdiffstats
path: root/src/desktop.c
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-01-25 18:55:15 +0200
committerMarius Vlad <marius.vlad@collabora.com>2024-02-22 13:51:33 +0000
commit09fa5536e759792c80341305a536cd59aa801c6d (patch)
tree407b3133e0915a8f70238c40be9bb8452532ca45 /src/desktop.c
parent8a7f3fbbf0fd94bb1c29c59663392506a213c4b1 (diff)
layout/shell: Add basic support for split window
This introduces a new set_split request to allow changing the tile orientation of the window. See the protocol XML for more implementation details. Of importance difference from the previous implementation is that this patch makes use of the xdg-shell protocol, such that orientation is being handled over the configure event to the client. The protocol specifies a width to allow the client to control how much of the output be assign the split window and also a sticky window functionality. Bug-AGL: SPEC-4839 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ia8b7d04a7514f55d647c3ea76b13bab51a3586aa
Diffstat (limited to 'src/desktop.c')
-rw-r--r--src/desktop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/desktop.c b/src/desktop.c
index 3fd09bc..7875eb9 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -312,6 +312,7 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata)
output->area = output->area_saved;
}
+
/* reset the active surface as well */
if (output && output->active && output->active == surface) {
output->active->view->is_mapped = false;
@@ -342,6 +343,14 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata)
weston_view_destroy(surface->view);
}
+ if (surface->role == IVI_SURFACE_ROLE_TILE) {
+ ivi_layout_reset_split_surfaces(surface->ivi);
+ // activate previous when resizing back to give input set
+ // output active for allowing to resizing again if needed
+ if (output->previous_active)
+ ivi_layout_activate_by_surf(output, output->previous_active);
+ }
+
/* invalidate agl-shell surfaces so we can re-use them when
* binding again */
if (surface->role == IVI_SURFACE_ROLE_PANEL) {