[PATCH 7/7] fullscreen-shell: Keep fullscreen surface after all outputs are gone

Armin Krezović krezovic.armin at gmail.com
Fri Jul 29 11:26:28 UTC 2016


Currently, when all outputs are gone (all views are gone), a surface
is unmapped and destroyed, even though the client is still running.

This utilizes the previously added code to remap the surface when a
new output gets attached.

Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>
---
 fullscreen-shell/fullscreen-shell.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c
index 71d609c..42b1662 100644
--- a/fullscreen-shell/fullscreen-shell.c
+++ b/fullscreen-shell/fullscreen-shell.c
@@ -262,11 +262,21 @@ fs_output_clear_pending(struct fs_output *fsout);
 static void
 fs_output_destroy(struct fs_output *fsout)
 {
-	fs_output_set_surface(fsout, NULL, 0, 0, 0);
 	fs_output_clear_pending(fsout);
 
 	wl_list_remove(&fsout->link);
 
+	if (fsout->view) {
+		weston_view_destroy(fsout->view);
+		fsout->view = NULL;
+	}
+
+	if (fsout->surface && wl_list_empty(&fsout->shell->output_list)) {
+		add_unmapped_surface(fsout->shell, fsout->surface,
+				     fsout->method);
+		fsout->surface = NULL;
+	}
+
 	if (fsout->output)
 		wl_list_remove(&fsout->output_destroyed.link);
 }
-- 
2.9.2



More information about the wayland-devel mailing list