summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2011-04-18 12:27:03 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2011-05-23 23:50:14 -0400
commit65aa3e3927cc97e6d21fd24f5a8251d1ace385b6 (patch)
tree8bb6e4da2b5497a6ab16cd411471934f8c23a261
parentb192771b934d987f1acfb58778afa3031d1d605c (diff)
downloadmutter-65aa3e3927cc97e6d21fd24f5a8251d1ace385b6.tar.gz
window: don't allow side-by-side tiling of non-maximizable windows
If a window is not maximizable, then that probably means it looks dumb at very large sizes. Even if its hints would allow you to manually resize it to a large size, don't allow automatically tiling it to half the screen. https://bugzilla.gnome.org/show_bug.cgi?id=647901
-rw-r--r--src/core/window.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/window.c b/src/core/window.c
index d44293265..5d6b4f189 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3451,12 +3451,24 @@ meta_window_tile (MetaWindow *window)
}
static gboolean
+meta_window_can_tile_maximized (MetaWindow *window)
+{
+ if (!META_WINDOW_ALLOWS_RESIZE (window))
+ return FALSE;
+
+ if (!window->has_maximize_func)
+ return FALSE;
+
+ return TRUE;
+}
+
+static gboolean
meta_window_can_tile_side_by_side (MetaWindow *window)
{
const MetaMonitorInfo *monitor;
MetaRectangle tile_area;
- if (!META_WINDOW_ALLOWS_RESIZE (window))
+ if (!meta_window_can_tile_maximized (window))
return FALSE;
monitor = meta_screen_get_current_monitor (window->screen);
@@ -3482,18 +3494,6 @@ meta_window_can_tile_side_by_side (MetaWindow *window)
tile_area.height >= window->size_hints.min_height;
}
-static gboolean
-meta_window_can_tile_maximized (MetaWindow *window)
-{
- if (!META_WINDOW_ALLOWS_RESIZE (window))
- return FALSE;
-
- if (!window->has_maximize_func)
- return FALSE;
-
- return TRUE;
-}
-
static void
unmaximize_window_before_freeing (MetaWindow *window)
{