diff options
Diffstat (limited to 'src/core/window.c')
-rw-r--r-- | src/core/window.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/core/window.c b/src/core/window.c index 95d49885..9b2ad926 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, @@ -2751,7 +2746,7 @@ meta_window_can_tile (MetaWindow *window) MetaRectangle tile_area; /*if (!META_WINDOW_ALLOWS_RESIZE (window))*/ - if (!META_WINDOW_ALLOWS_RESIZE (window)) + if (!meta_window_can_tile_maximized (window) || window->shaded) return FALSE; monitor = meta_screen_get_current_xinerama (window->screen); @@ -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); @@ -3333,6 +3319,7 @@ send_sync_request (MetaWindow *window) ev.data.l[1] = meta_display_get_current_time (window->display); ev.data.l[2] = XSyncValueLow32 (value); ev.data.l[3] = XSyncValueHigh32 (value); + ev.data.l[4] = 0; /* We don't need to trap errors here as we are already * inside an error_trap_push()/pop() pair. |