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
This commit is contained in:
parent
d0414a3ea6
commit
64e6b77dc3
@ -3453,13 +3453,25 @@ 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
|
static gboolean
|
||||||
meta_window_can_tile_side_by_side (MetaWindow *window)
|
meta_window_can_tile_side_by_side (MetaWindow *window)
|
||||||
{
|
{
|
||||||
const MetaMonitorInfo *monitor;
|
const MetaMonitorInfo *monitor;
|
||||||
MetaRectangle tile_area;
|
MetaRectangle tile_area;
|
||||||
|
|
||||||
if (!META_WINDOW_ALLOWS_RESIZE (window))
|
if (!meta_window_can_tile_maximized (window))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
monitor = meta_screen_get_current_monitor (window->screen);
|
monitor = meta_screen_get_current_monitor (window->screen);
|
||||||
@ -3485,18 +3497,6 @@ meta_window_can_tile_side_by_side (MetaWindow *window)
|
|||||||
tile_area.height >= window->size_hints.min_height;
|
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
|
static void
|
||||||
unmaximize_window_before_freeing (MetaWindow *window)
|
unmaximize_window_before_freeing (MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user