tiling: Add new "maximized" tile

In addition to the existing side-by-side tiling modes, this commit
adds a new "maximize" tiling mode.  It allows the user to maximize
their windows (in other words, tile with the edge panels) by dragging
their window to the top edge of the monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=630548
This commit is contained in:
Ray Strode
2010-09-24 15:35:00 -04:00
parent 5f4ee1b6e7
commit 07c0471902
3 changed files with 98 additions and 22 deletions

View File

@@ -1758,6 +1758,7 @@ meta_screen_tile_preview_update_timeout (gpointer data)
MetaScreen *screen = data;
MetaWindow *window = screen->display->grab_window;
gboolean composited = screen->display->compositor != NULL;
gboolean needs_preview = FALSE;
screen->tile_preview_timeout_id = 0;
@@ -1775,9 +1776,28 @@ meta_screen_tile_preview_update_timeout (gpointer data)
create_serial);
}
if (window
&& !META_WINDOW_TILED_SIDE_BY_SIDE (window)
&& window->tile_mode != META_TILE_NONE)
if (window)
{
switch (window->tile_mode)
{
case META_TILE_LEFT:
case META_TILE_RIGHT:
if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
needs_preview = TRUE;
break;
case META_TILE_MAXIMIZED:
if (!META_WINDOW_MAXIMIZED (window))
needs_preview = TRUE;
break;
default:
needs_preview = FALSE;
break;
}
}
if (needs_preview)
{
MetaRectangle tile_rect;