[PATCH 9/9] shell: set_fullscreen and set_maximized in clone mode

Xiong Zhang xiong.y.zhang at intel.com
Thu Feb 13 23:17:44 PST 2014


if the assigned output is slave, change the assigned output to
associated master output

Signed-off-by: Xiong Zhang <xiong.y.zhang at intel.com>
---
 desktop-shell/shell.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 2bc1856..0edefbd 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2372,8 +2372,11 @@ shell_surface_set_fullscreen(struct wl_client *client,
 	struct shell_surface *shsurf = wl_resource_get_user_data(resource);
 	struct weston_output *output;
 
-	if (output_resource)
+	if (output_resource) {
 		output = wl_resource_get_user_data(output_resource);
+		if (output->is_slave)
+			output = output->master_output;
+	}
 	else
 		output = NULL;
 
@@ -2477,9 +2480,11 @@ shell_surface_set_maximized(struct wl_client *client,
 	struct shell_surface *shsurf = wl_resource_get_user_data(resource);
 	struct weston_output *output;
 
-	if (output_resource)
+	if (output_resource) {
 		output = wl_resource_get_user_data(output_resource);
-	else
+		if (output->is_slave)
+			output = output->master_output;
+	} else
 		output = NULL;
 
 	shell_surface_set_parent(shsurf, NULL);
-- 
1.8.3.2



More information about the wayland-devel mailing list