[PATCH 08/17] shell: Tidy up unset_fullscreen()

Philip Withnall philip at tecnocode.co.uk
Mon Nov 25 10:01:37 PST 2013


From: Philip Withnall <philip.withnall at collabora.co.uk>

No functional changes, merely some presentational cleanup.
---
 src/shell.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 209ed30..9d6a7c2 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2115,19 +2115,24 @@ static void
 unset_fullscreen(struct shell_surface *shsurf)
 {
 	struct workspace *ws;
-	/* undo all fullscreen things here */
+
+	/* Unset the fullscreen output, driver configuration and transforms. */
 	if (shsurf->fullscreen.type == WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER &&
 	    shell_surface_is_top_fullscreen(shsurf)) {
 		restore_output_mode(shsurf->fullscreen_output);
 	}
+	shsurf->fullscreen_output = NULL;
+
 	shsurf->fullscreen.type = WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT;
 	shsurf->fullscreen.framerate = 0;
+
 	wl_list_remove(&shsurf->fullscreen.transform.link);
 	wl_list_init(&shsurf->fullscreen.transform.link);
+
 	if (shsurf->fullscreen.black_view)
 		weston_surface_destroy(shsurf->fullscreen.black_view->surface);
 	shsurf->fullscreen.black_view = NULL;
-	shsurf->fullscreen_output = NULL;
+
 	weston_view_set_position(shsurf->view,
 				 shsurf->saved_x, shsurf->saved_y);
 	if (shsurf->saved_rotation_valid) {
-- 
1.8.3.1



More information about the wayland-devel mailing list