[PATCH weston 2/2] desktop-shell: Add back the saved position for fullscreen/maximized

Quentin Glidic sardemff7+wayland at sardemff7.net
Tue Aug 16 12:30:07 UTC 2016


From: Quentin Glidic <sardemff7+git at sardemff7.net>

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
 desktop-shell/shell.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index cc091a9..7ea7aa2 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2488,6 +2488,12 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
 	    old_maximized == shsurf->state.maximized)
 	    return;
 
+	if (shsurf->state.fullscreen || shsurf->state.maximized) {
+		shsurf->saved_x = shsurf->view->geometry.x;
+		shsurf->saved_y = shsurf->view->geometry.y;
+		shsurf->saved_position_valid = true;
+	}
+
 	if (shsurf->state.fullscreen) {
 		shell_configure_fullscreen(shsurf);
 	} else if (shsurf->state.maximized) {
-- 
2.9.2



More information about the wayland-devel mailing list