window: save allocation only for toplevel window
Thanks to that we will not overwrite saved allocation, when going fullscreen from maximized state
This commit is contained in:
committed by
Kristian Høgsberg
parent
fffdcdd654
commit
fc22be0bb9
+3
-1
@@ -3398,8 +3398,10 @@ window_set_fullscreen(struct window *window, int fullscreen)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
window->type = TYPE_FULLSCREEN;
|
if (window->type == TYPE_TOPLEVEL) {
|
||||||
window->saved_allocation = window->main_surface->allocation;
|
window->saved_allocation = window->main_surface->allocation;
|
||||||
|
}
|
||||||
|
window->type = TYPE_FULLSCREEN;
|
||||||
wl_shell_surface_set_fullscreen(window->shell_surface,
|
wl_shell_surface_set_fullscreen(window->shell_surface,
|
||||||
window->fullscreen_method,
|
window->fullscreen_method,
|
||||||
0, NULL);
|
0, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user