summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorMiguel A. Colón Vélez <[email protected]>2015-01-01 21:24:40 -0500
committerMiguel A. Colón Vélez <[email protected]>2015-01-01 21:24:40 -0500
commit07f6f968dbe96ff7c8eb4347f2bbb4457f73c30a (patch)
treefe1810bfa13d635fc3072884bac4383438b637d0 /src/core
parent8a34cf4df4214f8e15e46568ee581b672e559fe8 (diff)
downloadmarco-07f6f968dbe96ff7c8eb4347f2bbb4457f73c30a.tar.bz2
marco-07f6f968dbe96ff7c8eb4347f2bbb4457f73c30a.tar.xz
BugFix: Can't unmaximize a tiled window.
The removed code did not allow tiled windows to be unmaximized. The code was trying to retile a tiled window when it was asked to unmaximize it. The only thing it did was turn a maximized window into a tiled window but that is not the normal expected behaviour of unmaximization. . I also reset window->tile_mode to ensure we always unmaximize correctly. Some duplicate code was also removed. . This bug affects tiling with: - tile-to-side-w - tile-to-side-e - Mouse dragging to the west corner - Mouse dragging to the east corner . Therefore it's an old bug unrelated to the new keybindings.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/window.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 95d49885..e820a26c 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2670,14 +2670,9 @@ meta_window_maximize (MetaWindow *window,
if (window->tile_mode != META_TILE_NONE)
{
saved_rect = &window->saved_rect;
- window->maximized_vertically = FALSE;
- }
-
- if (window->tile_mode != META_TILE_NONE)
- {
- saved_rect = &window->saved_rect;
window->maximized_vertically = FALSE;
+ window->tile_mode = META_TILE_NONE;
}
meta_window_maximize_internal (window,
@@ -2780,15 +2775,6 @@ meta_window_unmaximize (MetaWindow *window,
/* At least one of the two directions ought to be set */
gboolean unmaximize_horizontally, unmaximize_vertically;
- /* Restore tiling if necessary */
- if (window->tile_mode == META_TILE_LEFT ||
- window->tile_mode == META_TILE_RIGHT)
- {
- window->maximized_horizontally = FALSE;
- meta_window_tile (window);
- return;
- }
-
unmaximize_horizontally = directions & META_MAXIMIZE_HORIZONTAL;
unmaximize_vertically = directions & META_MAXIMIZE_VERTICAL;
g_assert (unmaximize_horizontally || unmaximize_vertically);