[PATCH] shell: Save the width and height known by the shell surface.

Rafael Antognolli rafael.antognolli at intel.com
Wed Dec 11 16:27:24 PST 2013


Instead of using the surface size, save the last known shell surface
size, and use that one to emit on configure, when the surface is
returning from maximized or fullscreen state.

The surface size can't be saved because it will have already changed
when the surface is transitioning to fullscreen or maximized.
---
 desktop-shell/shell.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 9fbac00..4f9f21e 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2373,8 +2373,8 @@ set_full_output(struct shell_surface *shsurf)
 {
 	shsurf->saved_x = shsurf->view->geometry.x;
 	shsurf->saved_y = shsurf->view->geometry.y;
-	shsurf->saved_width = shsurf->surface->width;
-	shsurf->saved_height = shsurf->surface->height;
+	shsurf->saved_width = shsurf->last_width;
+	shsurf->saved_height = shsurf->last_height;
 	shsurf->saved_size_valid = true;
 	shsurf->saved_position_valid = true;
 
-- 
1.8.3.1



More information about the wayland-devel mailing list