[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
commit.

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)
 		weston_desktop_surface_get_surface(shsurf->desktop_surface);
 
 	/* undo all maximized things here */
-	shsurf->output = get_default_output(surface->compositor);
-
 	if (shsurf->saved_position_valid)
 		weston_view_set_position(shsurf->view,
 					 shsurf->saved_x, shsurf->saved_y);
-- 
2.12.2



More information about the wayland-devel mailing list