Revert "window: Remove old tiling code"
This reverts commit 8bded7d497
.
This commit is contained in:
@ -117,6 +117,7 @@ meta_stack_add (MetaStack *stack,
|
||||
window->desc, window->stack_position);
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@ -152,6 +153,7 @@ meta_stack_remove (MetaStack *stack,
|
||||
GUINT_TO_POINTER (window->frame->xwindow));
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@ -161,6 +163,7 @@ meta_stack_update_layer (MetaStack *stack,
|
||||
stack->need_relayer = TRUE;
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@ -170,6 +173,7 @@ meta_stack_update_transient (MetaStack *stack,
|
||||
stack->need_constrain = TRUE;
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
/* raise/lower within a layer */
|
||||
@ -198,6 +202,7 @@ meta_stack_raise (MetaStack *stack,
|
||||
meta_window_set_stack_position_no_sync (window, max_stack_position);
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@ -225,6 +230,7 @@ meta_stack_lower (MetaStack *stack,
|
||||
meta_window_set_stack_position_no_sync (window, min_stack_position);
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@ -240,6 +246,27 @@ meta_stack_thaw (MetaStack *stack)
|
||||
|
||||
stack->freeze_count -= 1;
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_stack_update_window_tile_matches (MetaStack *stack,
|
||||
MetaWorkspace *workspace)
|
||||
{
|
||||
GList *windows, *tmp;
|
||||
|
||||
if (stack->freeze_count > 0)
|
||||
return;
|
||||
|
||||
windows = meta_stack_list_windows (stack, workspace);
|
||||
tmp = windows;
|
||||
while (tmp)
|
||||
{
|
||||
meta_window_compute_tile_match ((MetaWindow *) tmp->data);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -1421,6 +1448,7 @@ meta_stack_set_positions (MetaStack *stack,
|
||||
"Reset the stack positions of (nearly) all windows\n");
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1483,4 +1511,6 @@ meta_window_set_stack_position (MetaWindow *window,
|
||||
{
|
||||
meta_window_set_stack_position_no_sync (window, position);
|
||||
stack_sync_to_xserver (window->screen->stack);
|
||||
meta_stack_update_window_tile_matches (window->screen->stack,
|
||||
window->screen->active_workspace);
|
||||
}
|
||||
|
Reference in New Issue
Block a user