Skip to content

Commit 5492559

Browse files
committed
window: Fix corner-tiled windows becoming maximized on reload
Corner-tiled windows were being treated as maximized horizontally, which is wrong. Instead, we clear all maximized flags to make sure their size is respected on reload. Fixes #710
1 parent 8fddd5d commit 5492559

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/core/window.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,9 +2715,12 @@ meta_window_tile (MetaWindow *window)
27152715
window->tile_mode == META_TILE_TOP_RIGHT ||
27162716
window->tile_mode == META_TILE_TOP_LEFT)
27172717
{
2718-
MetaRectangle *saved_rect = NULL;
2719-
saved_rect = &window->saved_rect;
2720-
meta_window_maximize_internal (window, META_MAXIMIZE_HORIZONTAL, saved_rect);
2718+
/* Corner-tiled windows should not be maximized in any direction.
2719+
* Don't modify saved_rect to preserve it when corner-tiling a
2720+
* maximized window. Make sure both maximized flags are cleared
2721+
* so _NET_WM_STATE doesn't get MAXIMIZED_HORZ or MAXIMIZED_VERT set. */
2722+
window->maximized_horizontally = FALSE;
2723+
window->maximized_vertically = FALSE;
27212724
}
27222725
else
27232726
meta_window_save_rect (window);
@@ -2735,6 +2738,7 @@ meta_window_tile (MetaWindow *window)
27352738
}
27362739

27372740
set_allowed_actions_hint (window);
2741+
set_net_wm_state (window);
27382742
}
27392743

27402744
void

0 commit comments

Comments
 (0)