From 07f6f968dbe96ff7c8eb4347f2bbb4457f73c30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Thu, 1 Jan 2015 21:24:40 -0500 Subject: 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. --- src/core/window.c | 16 +--------------- 1 file changed, 1 insertion(+), 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 @@ -2667,17 +2667,12 @@ meta_window_maximize (MetaWindow *window, return; } - 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); -- cgit v1.2.1