[PATCH 3/4] window: save allocation only for toplevel window

Rafal Mielniczuk rafal.mielniczuk2 at gmail.com
Mon Mar 11 11:26:55 PDT 2013


Thanks to that we will not overwrite saved allocation, when going
fullscreen from maximized state
---
 clients/window.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/clients/window.c b/clients/window.c
index 249ba6f..3e8225f 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -3398,8 +3398,10 @@ window_set_fullscreen(struct window *window, int fullscreen)
 		return;
 
 	if (fullscreen) {
+		if (window->type == TYPE_TOPLEVEL) {
+			window->saved_allocation = window->main_surface->allocation;
+		}
 		window->type = TYPE_FULLSCREEN;
-		window->saved_allocation = window->main_surface->allocation;
 		wl_shell_surface_set_fullscreen(window->shell_surface,
 						window->fullscreen_method,
 						0, NULL);
-- 
1.8.1.5



More information about the wayland-devel mailing list