[PATCH weston] desktop-shell: Position maximized surfaces on the correct output.

Emmanuel Gil Peyrot emmanuel.peyrot at collabora.com
Tue Apr 4 16:56:48 UTC 2017

During a maximize event, a surface was previously always put back to
the primary output after one frame on the correct output, while keeping
its size.  This was due to unset_maximized() resetting the output of
the shell surface to the primary output whenever the surface received a

This fix simply leaves the shell surface’s output as it was before the
unmaximize operation.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
 desktop-shell/shell.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index c9058795..1e97feba 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1965,8 +1965,6 @@ unset_maximized(struct shell_surface *shsurf)
 	/* undo all maximized things here */
-	shsurf->output = get_default_output(surface->compositor);
 	if (shsurf->saved_position_valid)
 					 shsurf->saved_x, shsurf->saved_y);

More information about the wayland-devel mailing list