[PATCH 09/16] xdg-shell: xdg_surface_set_output should only affect fullscreen.

Rafael Antognolli rafael.antognolli at intel.com
Wed Nov 27 09:50:25 PST 2013


---
 src/shell.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 7040acc..db8e815 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -303,6 +303,7 @@ struct shell_surface {
 
 	struct weston_output *fullscreen_output;
 	struct weston_output *output;
+	struct weston_output *recommended_output;
 	struct wl_list link;
 
 	const struct weston_shell_client *client;
@@ -3069,8 +3070,7 @@ xdg_surface_set_output(struct wl_client *client,
 	else
 		output = NULL;
 
-	if (!weston_surface_is_mapped(shsurf->surface))
-		shsurf->output = output;
+	shsurf->recommended_output = output;
 }
 
 static void
@@ -3087,7 +3087,7 @@ xdg_surface_set_fullscreen(struct wl_client *client,
 		shsurf->state_changed = true;
 		set_fullscreen(shsurf,
 			       WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
-			       0, shsurf->output);
+			       0, shsurf->recommended_output);
 	}
 }
 
@@ -3132,7 +3132,7 @@ xdg_surface_set_maximized(struct wl_client *client,
 	if (!shsurf->next.maximized) {
 		shsurf->next.maximized = true;
 		shsurf->state_changed = true;
-		set_maximized(shsurf, shsurf->output);
+		set_maximized(shsurf, NULL);
 	}
 }
 
-- 
1.8.3.1



More information about the wayland-devel mailing list