App can specify the output for maximize and fullscreen show, limited the output to primary output when clone mode enabled to avoid App assign a fault output
Signed-off-by: Xiong Zhang <xiong.y.zh...@intel.com> --- src/shell.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shell.c b/src/shell.c index 7ff8697..9c043ac 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1833,10 +1833,12 @@ shell_surface_set_maximized(struct wl_client *client, struct weston_surface *es = shsurf->surface; struct desktop_shell *shell = NULL; uint32_t edges = 0, panel_height = 0; + struct weston_compositor *wc = es->compositor; /* get the default output, if the client set it as NULL check whether the ouput is available */ - if (output_resource) + if (output_resource && + (wc->multiscreen_mode == WESTON_MULTISCREEN_EXTEND)) shsurf->output = wl_resource_get_user_data(output_resource); else if (es->output) shsurf->output = es->output; @@ -2021,8 +2023,10 @@ set_fullscreen(struct shell_surface *shsurf, struct weston_output *output) { struct weston_surface *es = shsurf->surface; + struct weston_compositor *wc = es->compositor; - if (output) + if (output && + (wc->multiscreen_mode == WESTON_MULTISCREEN_EXTEND)) shsurf->output = output; else if (es->output) shsurf->output = es->output; -- 1.8.3.2 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel