Make tile preview a compositor plugin effect

https://bugzilla.gnome.org/show_bug.cgi?id=665758
This commit is contained in:
Stefano Facchini
2012-03-24 11:29:39 +01:00
committed by Florian Müllner
parent 17462c21e8
commit 4de3f7ca29
15 changed files with 216 additions and 279 deletions

View File

@ -1177,9 +1177,6 @@ _meta_window_shared_new (MetaDisplay *display,
if (!window->override_redirect)
meta_stack_add (window->screen->stack,
window);
else if (window->screen->tile_preview != NULL &&
meta_tile_preview_get_xwindow (window->screen->tile_preview, NULL) == xwindow)
window->layer = META_LAYER_NORMAL;
else
window->layer = META_LAYER_OVERRIDE_REDIRECT; /* otherwise set by MetaStack */
@ -3369,7 +3366,7 @@ meta_window_tile (MetaWindow *window)
directions = META_MAXIMIZE_VERTICAL;
meta_window_maximize_internal (window, directions, NULL);
meta_screen_tile_preview_update (window->screen, FALSE);
meta_screen_update_tile_preview (window->screen, FALSE);
if (window->display->compositor)
{
@ -8108,7 +8105,7 @@ update_move (MetaWindow *window,
* trigger it unwittingly, e.g. when shaking loose the window or moving
* it to another monitor.
*/
meta_screen_tile_preview_update (window->screen,
meta_screen_update_tile_preview (window->screen,
window->tile_mode != META_TILE_NONE);
meta_window_get_client_root_coords (window, &old);
@ -8956,6 +8953,20 @@ meta_window_get_work_area_all_monitors (MetaWindow *window,
window->desc, area->x, area->y, area->width, area->height);
}
int
meta_window_get_current_tile_monitor_number (MetaWindow *window)
{
int tile_monitor_number = window->tile_monitor_number;
if (tile_monitor_number < 0)
{
meta_warning ("%s called with an invalid monitor number; using 0 instead\n", G_STRFUNC);
tile_monitor_number = 0;
}
return tile_monitor_number;
}
void
meta_window_get_current_tile_area (MetaWindow *window,
MetaRectangle *tile_area)
@ -8964,12 +8975,7 @@ meta_window_get_current_tile_area (MetaWindow *window,
g_return_if_fail (window->tile_mode != META_TILE_NONE);
tile_monitor_number = window->tile_monitor_number;
if (tile_monitor_number < 0)
{
meta_warning ("%s called with an invalid monitor number; using 0 instead\n", G_STRFUNC);
tile_monitor_number = 0;
}
tile_monitor_number = meta_window_get_current_tile_monitor_number (window);
meta_window_get_work_area_for_monitor (window, tile_monitor_number, tile_area);