Go to the source code of this file.
Data Structures | |
| struct | Constraint |
Defines | |
| #define | WINDOW_HAS_TRANSIENT_TYPE(w) |
| #define | WINDOW_TRANSIENT_FOR_WHOLE_GROUP(w) |
| #define | WINDOW_IN_STACK(w) (w->stack_position >= 0) |
Typedefs | |
| typedef struct Constraint | Constraint |
Functions | |
| static void | stack_sync_to_server (MetaStack *stack) |
| Order the windows on the X server to be the same as in our structure. | |
| static void | meta_window_set_stack_position_no_sync (MetaWindow *window, int position) |
| static void | stack_do_window_deletions (MetaStack *stack) |
| Go through "deleted" and take the matching windows out of "windows". | |
| static void | stack_do_window_additions (MetaStack *stack) |
| static void | stack_do_relayer (MetaStack *stack) |
| Update the layers that windows are in. | |
| static void | stack_do_constrain (MetaStack *stack) |
| Update stack_position and layer to reflect transiency constraints. | |
| static void | stack_do_resort (MetaStack *stack) |
| Sort stack->sorted with layers having priority over stack_position. | |
| static void | stack_ensure_sorted (MetaStack *stack) |
| Puts the stack into canonical form. | |
| MetaStack * | meta_stack_new (MetaScreen *screen) |
| Creates and initialises a MetaStack. | |
| void | meta_stack_free (MetaStack *stack) |
| Destroys and frees a MetaStack. | |
| void | meta_stack_add (MetaStack *stack, MetaWindow *window) |
| Adds a window to the local stack. | |
| void | meta_stack_remove (MetaStack *stack, MetaWindow *window) |
| Removes a window from the local stack. | |
| void | meta_stack_update_layer (MetaStack *stack, MetaWindow *window) |
| Recalculates the correct layer for all windows in the stack, and moves them about accordingly. | |
| void | meta_stack_update_transient (MetaStack *stack, MetaWindow *window) |
| Recalculates the correct stacking order for all windows in the stack according to their transience, and moves them about accordingly. | |
| void | meta_stack_raise (MetaStack *stack, MetaWindow *window) |
| Move a window to the top of its layer. | |
| void | meta_stack_lower (MetaStack *stack, MetaWindow *window) |
| Move a window to the bottom of its layer. | |
| void | meta_stack_freeze (MetaStack *stack) |
| Prevent syncing to server until the next call of meta_stack_thaw(), so that we can carry out multiple operations in one go without having everything halfway reflected on the X server. | |
| void | meta_stack_thaw (MetaStack *stack) |
| Undoes a meta_stack_freeze(), and processes anything which has become necessary during the freeze. | |
| static gboolean | is_focused_foreach (MetaWindow *window, void *data) |
| static gboolean | windows_on_different_xinerama (MetaWindow *a, MetaWindow *b) |
| static MetaStackLayer | get_standalone_layer (MetaWindow *window) |
| static MetaStackLayer | get_maximum_layer_in_group (MetaWindow *window) |
| static void | compute_layer (MetaWindow *window) |
| static int | compare_window_position (void *a, void *b) |
| static void | add_constraint (Constraint **constraints, MetaWindow *above, MetaWindow *below) |
| static void | create_constraints (Constraint **constraints, GList *windows) |
| static void | graph_constraints (Constraint **constraints, int n_constraints) |
| static void | free_constraints (Constraint **constraints, int n_constraints) |
| static void | ensure_above (MetaWindow *above, MetaWindow *below) |
| static void | traverse_constraint (Constraint *c) |
| static void | apply_constraints (Constraint **constraints, int n_constraints) |
| static void | raise_window_relative_to_managed_windows (MetaScreen *screen, Window xwindow) |
| This function is used to avoid raising a window above popup menus and other such things. | |
| MetaWindow * | meta_stack_get_top (MetaStack *stack) |
| Finds the top window on the stack. | |
| MetaWindow * | meta_stack_get_bottom (MetaStack *stack) |
| Finds the window at the bottom of the stack. | |
| MetaWindow * | meta_stack_get_above (MetaStack *stack, MetaWindow *window, gboolean only_within_layer) |
| Finds the window above a given window in the stack. | |
| MetaWindow * | meta_stack_get_below (MetaStack *stack, MetaWindow *window, gboolean only_within_layer) |
| Finds the window below a given window in the stack. | |
| static gboolean | window_contains_point (MetaWindow *window, int root_x, int root_y) |
| static MetaWindow * | get_default_focus_window (MetaStack *stack, MetaWorkspace *workspace, MetaWindow *not_this_one, gboolean must_be_at_point, int root_x, int root_y) |
| MetaWindow * | meta_stack_get_default_focus_window_at_point (MetaStack *stack, MetaWorkspace *workspace, MetaWindow *not_this_one, int root_x, int root_y) |
| Find the topmost, focusable, mapped, window in a stack. | |
| MetaWindow * | meta_stack_get_default_focus_window (MetaStack *stack, MetaWorkspace *workspace, MetaWindow *not_this_one) |
| Find the topmost, focusable, mapped, window in a stack. | |
| GList * | meta_stack_list_windows (MetaStack *stack, MetaWorkspace *workspace) |
| Finds all the windows in the stack, in order. | |
| int | meta_stack_windows_cmp (MetaStack *stack, MetaWindow *window_a, MetaWindow *window_b) |
| Comparison function for windows within a stack. | |
| static int | compare_just_window_stack_position (void *a, void *b) |
| GList * | meta_stack_get_positions (MetaStack *stack) |
| Returns the current stack state, allowing rudimentary transactions. | |
| static gint | compare_pointers (gconstpointer a, gconstpointer b) |
| static gboolean | lists_contain_same_windows (GList *a, GList *b) |
| void | meta_stack_set_positions (MetaStack *stack, GList *windows) |
| Rolls back a transaction, given the list returned from meta_stack_get_positions(). | |
| void | meta_window_set_stack_position (MetaWindow *window, int position) |
| Sets the position of a window within the stack. | |
Definition in file stack.c.
| #define WINDOW_HAS_TRANSIENT_TYPE | ( | w | ) |
Value:
(w->type == META_WINDOW_DIALOG || \ w->type == META_WINDOW_MODAL_DIALOG || \ w->type == META_WINDOW_TOOLBAR || \ w->type == META_WINDOW_MENU || \ w->type == META_WINDOW_UTILITY)
Definition at line 40 of file stack.c.
Referenced by compute_layer(), create_constraints(), and ensure_above().
| #define WINDOW_IN_STACK | ( | w | ) | (w->stack_position >= 0) |
| #define WINDOW_TRANSIENT_FOR_WHOLE_GROUP | ( | w | ) |
Value:
((w->xtransient_for == None || \
w->transient_parent_is_root_window) && \
WINDOW_HAS_TRANSIENT_TYPE (w))
Definition at line 47 of file stack.c.
Referenced by create_constraints().
| typedef struct Constraint Constraint |
| static void add_constraint | ( | Constraint ** | constraints, | |
| MetaWindow * | above, | |||
| MetaWindow * | below | |||
| ) | [static] |
Definition at line 455 of file stack.c.
References Constraint::above, Constraint::applied, Constraint::below, FALSE, Constraint::has_prev, Constraint::next, Constraint::next_nodes, NULL, _MetaWindow::screen, and _MetaWindow::stack_position.
Referenced by create_constraints().
| static void apply_constraints | ( | Constraint ** | constraints, | |
| int | n_constraints | |||
| ) | [static] |
Definition at line 686 of file stack.c.
References Constraint::has_prev, Constraint::next, NULL, and traverse_constraint().
Referenced by stack_do_constrain().
| static int compare_just_window_stack_position | ( | void * | a, | |
| void * | b | |||
| ) | [static] |
Definition at line 1498 of file stack.c.
References _MetaWindow::stack_position.
Referenced by meta_stack_get_positions().
| static gint compare_pointers | ( | gconstpointer | a, | |
| gconstpointer | b | |||
| ) | [static] |
| static int compare_window_position | ( | void * | a, | |
| void * | b | |||
| ) | [static] |
Definition at line 364 of file stack.c.
References _MetaWindow::layer, and _MetaWindow::stack_position.
Referenced by stack_do_resort().
| static void compute_layer | ( | MetaWindow * | window | ) | [static] |
Definition at line 322 of file stack.c.
References _MetaWindow::desc, get_maximum_layer_in_group(), get_standalone_layer(), _MetaWindow::has_focus, _MetaWindow::layer, META_DEBUG_STACK, _MetaWindow::transient_parent_is_root_window, _MetaWindow::type, WINDOW_HAS_TRANSIENT_TYPE, and _MetaWindow::xtransient_for.
Referenced by stack_do_relayer().
| static void create_constraints | ( | Constraint ** | constraints, | |
| GList * | windows | |||
| ) | [static] |
Definition at line 485 of file stack.c.
References add_constraint(), _MetaWindow::desc, _MetaWindow::display, META_DEBUG_STACK, meta_display_lookup_x_window(), meta_group_list_windows(), meta_window_get_group(), meta_window_is_ancestor_of_transient(), NULL, _MetaWindow::screen, _MetaWindow::transient_parent_is_root_window, WINDOW_HAS_TRANSIENT_TYPE, WINDOW_IN_STACK, WINDOW_TRANSIENT_FOR_WHOLE_GROUP, and _MetaWindow::xtransient_for.
Referenced by stack_do_constrain().
| static void ensure_above | ( | MetaWindow * | above, | |
| MetaWindow * | below | |||
| ) | [static] |
Definition at line 642 of file stack.c.
References _MetaWindow::desc, _MetaWindow::layer, META_DEBUG_STACK, meta_window_set_stack_position_no_sync(), _MetaWindow::stack_position, and WINDOW_HAS_TRANSIENT_TYPE.
Referenced by traverse_constraint().
| static void free_constraints | ( | Constraint ** | constraints, | |
| int | n_constraints | |||
| ) | [static] |
Definition at line 615 of file stack.c.
References Constraint::next, Constraint::next_nodes, and NULL.
Referenced by stack_do_constrain().
| static MetaWindow* get_default_focus_window | ( | MetaStack * | stack, | |
| MetaWorkspace * | workspace, | |||
| MetaWindow * | not_this_one, | |||
| gboolean | must_be_at_point, | |||
| int | root_x, | |||
| int | root_y | |||
| ) | [static] |
Definition at line 1331 of file stack.c.
References _MetaWindow::input, META_WINDOW_DOCK, meta_window_get_group(), meta_window_located_on_workspace(), _MetaWindow::minimized, NULL, _MetaStack::sorted, stack_ensure_sorted(), _MetaWindow::take_focus, _MetaWindow::type, _MetaWindow::unmaps_pending, window_contains_point(), _MetaWindow::xtransient_for, and _MetaWindow::xwindow.
Referenced by meta_stack_get_default_focus_window(), and meta_stack_get_default_focus_window_at_point().
| static MetaStackLayer get_maximum_layer_in_group | ( | MetaWindow * | window | ) | [static] |
Definition at line 287 of file stack.c.
References get_standalone_layer(), meta_group_list_windows(), META_LAYER_DESKTOP, meta_window_get_group(), and NULL.
Referenced by compute_layer().
| static MetaStackLayer get_standalone_layer | ( | MetaWindow * | window | ) | [static] |
Definition at line 239 of file stack.c.
References _MetaWindow::display, _MetaDisplay::expected_focus_window, FALSE, _MetaWindow::fullscreen, is_focused_foreach(), META_LAYER_BOTTOM, META_LAYER_DESKTOP, META_LAYER_DOCK, META_LAYER_FULLSCREEN, META_LAYER_NORMAL, META_LAYER_TOP, META_WINDOW_DESKTOP, META_WINDOW_DOCK, meta_window_foreach_transient(), NULL, _MetaWindow::type, windows_on_different_xinerama(), _MetaWindow::wm_state_above, and _MetaWindow::wm_state_below.
Referenced by compute_layer(), and get_maximum_layer_in_group().
| static void graph_constraints | ( | Constraint ** | constraints, | |
| int | n_constraints | |||
| ) | [static] |
Definition at line 572 of file stack.c.
References Constraint::above, Constraint::below, Constraint::has_prev, Constraint::next, Constraint::next_nodes, NULL, _MetaWindow::stack_position, and TRUE.
Referenced by stack_do_constrain().
| static gboolean is_focused_foreach | ( | MetaWindow * | window, | |
| void * | data | |||
| ) | [static] |
Definition at line 215 of file stack.c.
References _MetaWindow::display, _MetaDisplay::expected_focus_window, FALSE, and TRUE.
Referenced by get_standalone_layer().
| static gboolean lists_contain_same_windows | ( | GList * | a, | |
| GList * | b | |||
| ) | [static] |
Definition at line 1539 of file stack.c.
References compare_pointers(), FALSE, and NULL.
Referenced by meta_stack_set_positions().
| void meta_stack_add | ( | MetaStack * | stack, | |
| MetaWindow * | window | |||
| ) |
Adds a window to the local stack.
It is a fatal error to call this function on a window which already exists on the stack of any screen.
| window | The window to add | |
| stack | The stack to add it to |
Definition at line 107 of file stack.c.
References _MetaStack::added, _MetaWindow::desc, meta_bug(), META_DEBUG_STACK, _MetaStack::n_positions, _MetaWindow::stack_position, and stack_sync_to_server().
Referenced by meta_window_new_with_attrs().
| void meta_stack_free | ( | MetaStack * | stack | ) |
Destroys and frees a MetaStack.
| stack | The stack to destroy. |
Definition at line 92 of file stack.c.
References _MetaStack::added, _MetaStack::last_root_children_stacked, _MetaStack::removed, _MetaStack::sorted, TRUE, and _MetaStack::windows.
Referenced by meta_screen_free().
| void meta_stack_freeze | ( | MetaStack * | stack | ) |
Prevent syncing to server until the next call of meta_stack_thaw(), so that we can carry out multiple operations in one go without having everything halfway reflected on the X server.
(Calls to meta_stack_freeze() nest, so that multiple calls to meta_stack_freeze will require multiple calls to meta_stack_thaw().)
| stack | The stack to freeze. |
Definition at line 200 of file stack.c.
References _MetaStack::freeze_count.
Referenced by meta_group_update_layers(), meta_screen_composite_all_windows(), meta_screen_manage_all_windows(), meta_window_free(), meta_window_make_fullscreen_internal(), meta_window_new_with_attrs(), and meta_window_update_layer().
| MetaWindow* meta_stack_get_above | ( | MetaStack * | stack, | |
| MetaWindow * | window, | |||
| gboolean | only_within_layer | |||
| ) |
Finds the window above a given window in the stack.
It is not an error to pass in a window which does not exist in the stack; the function will merely return NULL.
| stack | The stack to search. | |
| window | The window to look above. | |
| only_within_layer | If true, will return NULL if "window" is the top window in its layer. |
Definition at line 1268 of file stack.c.
References _MetaWindow::layer, NULL, _MetaStack::sorted, and stack_ensure_sorted().
Referenced by handle_raise_or_lower().
| MetaWindow* meta_stack_get_below | ( | MetaStack * | stack, | |
| MetaWindow * | window, | |||
| gboolean | only_within_layer | |||
| ) |
Finds the window below a given window in the stack.
It is not an error to pass in a window which does not exist in the stack; the function will merely return NULL.
| stack | The stack to search. | |
| window | The window to look below. | |
| only_within_layer | If true, will return NULL if "window" is the bottom window in its layer. |
Definition at line 1293 of file stack.c.
References _MetaWindow::layer, NULL, _MetaStack::sorted, and stack_ensure_sorted().
| MetaWindow* meta_stack_get_bottom | ( | MetaStack * | stack | ) |
Finds the window at the bottom of the stack.
Since that's pretty much always the desktop, this isn't the most useful of functions, and nobody actually calls it. We should probably get rid of it.
| stack | The stack to search |
Definition at line 1254 of file stack.c.
References NULL, _MetaStack::sorted, and stack_ensure_sorted().
| MetaWindow* meta_stack_get_default_focus_window | ( | MetaStack * | stack, | |
| MetaWorkspace * | workspace, | |||
| MetaWindow * | not_this_one | |||
| ) |
Find the topmost, focusable, mapped, window in a stack.
If you supply a window as "not_this_one", we won't return that one (presumably because it's going to be going away). But if you do supply "not_this_one" and we find its parent, we'll return that; and if "not_this_one" is in a group, we'll return the top window of that group.
Also, we are prejudiced against dock windows. Every kind of window, even the desktop, will be returned in preference to a dock window.
| stack | The stack to search. | |
| workspace | NULL to search all workspaces; otherwise only windows from that workspace will be returned. | |
| not_this_one | Window to ignore because it's being unfocussed or going away. |
Definition at line 1438 of file stack.c.
References FALSE, and get_default_focus_window().
| MetaWindow* meta_stack_get_default_focus_window_at_point | ( | MetaStack * | stack, | |
| MetaWorkspace * | workspace, | |||
| MetaWindow * | not_this_one, | |||
| int | root_x, | |||
| int | root_y | |||
| ) |
Find the topmost, focusable, mapped, window in a stack.
If you supply a window as "not_this_one", we won't return that one (presumably because it's going to be going away). But if you do supply "not_this_one" and we find its parent, we'll return that; and if "not_this_one" is in a group, we'll return the top window of that group.
Also, we are prejudiced against dock windows. Every kind of window, even the desktop, will be returned in preference to a dock window.
| stack | The stack to search. | |
| workspace | NULL to search all workspaces; otherwise only windows from that workspace will be returned. | |
| not_this_one | Window to ignore because it's being unfocussed or going away. | |
| root_x | The returned window must contain this point, unless it's a dock. | |
| root_y | See root_x. |
Definition at line 1427 of file stack.c.
References get_default_focus_window(), and TRUE.
Referenced by meta_screen_get_mouse_window().
| GList* meta_stack_get_positions | ( | MetaStack * | stack | ) |
Returns the current stack state, allowing rudimentary transactions.
| stack | The stack to examine. |
Definition at line 1513 of file stack.c.
References compare_just_window_stack_position(), _MetaStack::sorted, and stack_ensure_sorted().
Referenced by meta_display_begin_grab_op().
| MetaWindow* meta_stack_get_top | ( | MetaStack * | stack | ) |
Finds the top window on the stack.
| stack | The stack to examine. |
Definition at line 1243 of file stack.c.
References NULL, _MetaStack::sorted, and stack_ensure_sorted().
Referenced by handle_raise_or_lower(), and window_raise_with_delay_callback().
| GList* meta_stack_list_windows | ( | MetaStack * | stack, | |
| MetaWorkspace * | workspace | |||
| ) |
Finds all the windows in the stack, in order.
| stack | The stack to examine. | |
| workspace | If non-NULL, only windows on this workspace will be returned; otherwise all windows in the stack will be returned. |
Definition at line 1447 of file stack.c.
References meta_window_located_on_workspace(), NULL, _MetaStack::sorted, and stack_ensure_sorted().
Referenced by meta_display_compute_resistance_and_snapping_edges(), and meta_select_workspace_expose_event().
| void meta_stack_lower | ( | MetaStack * | stack, | |
| MetaWindow * | window | |||
| ) |
Move a window to the bottom of its layer.
| stack | The stack to modify. | |
| window | The window that's on the way downwards. |
Definition at line 191 of file stack.c.
References meta_window_set_stack_position_no_sync(), and stack_sync_to_server().
Referenced by meta_window_lower().
| MetaStack* meta_stack_new | ( | MetaScreen * | screen | ) |
Creates and initialises a MetaStack.
| screen | The MetaScreen which will be the parent of this stack. |
Definition at line 66 of file stack.c.
References _MetaStack::added, FALSE, _MetaStack::freeze_count, _MetaStack::last_root_children_stacked, _MetaStack::n_positions, _MetaStack::need_constrain, _MetaStack::need_relayer, _MetaStack::need_resort, NULL, _MetaStack::removed, _MetaStack::screen, _MetaStack::sorted, and _MetaStack::windows.
Referenced by meta_screen_new().
| void meta_stack_raise | ( | MetaStack * | stack, | |
| MetaWindow * | window | |||
| ) |
Move a window to the top of its layer.
| stack | The stack to modify. | |
| window | The window that's making an ascension. (Amulet of Yendor not required.) |
Definition at line 181 of file stack.c.
References meta_window_set_stack_position_no_sync(), _MetaStack::n_positions, and stack_sync_to_server().
Referenced by meta_window_raise().
| void meta_stack_remove | ( | MetaStack * | stack, | |
| MetaWindow * | window | |||
| ) |
Removes a window from the local stack.
It is a fatal error to call this function on a window which exists on the stack of any screen.
| window | The window to remove | |
| stack | The stack to remove it from |
Definition at line 127 of file stack.c.
References _MetaStack::added, _MetaWindow::desc, _MetaWindow::frame, meta_bug(), META_DEBUG_STACK, meta_window_set_stack_position_no_sync(), _MetaStack::n_positions, _MetaStack::removed, _MetaStack::sorted, _MetaWindow::stack_position, stack_sync_to_server(), _MetaFrame::xwindow, and _MetaWindow::xwindow.
Referenced by meta_window_free().
| void meta_stack_set_positions | ( | MetaStack * | stack, | |
| GList * | windows | |||
| ) |
Rolls back a transaction, given the list returned from meta_stack_get_positions().
| stack | The stack to roll back. | |
| windows | The list returned from meta_stack_get_positions(). |
Definition at line 1564 of file stack.c.
References lists_contain_same_windows(), META_DEBUG_STACK, meta_warning(), _MetaStack::need_constrain, _MetaStack::need_resort, NULL, _MetaStack::sorted, stack_ensure_sorted(), _MetaWindow::stack_position, stack_sync_to_server(), and TRUE.
Referenced by event_callback(), and process_tab_grab().
| void meta_stack_thaw | ( | MetaStack * | stack | ) |
Undoes a meta_stack_freeze(), and processes anything which has become necessary during the freeze.
It is an error to call this function if the stack has not been frozen.
| stack | The stack to thaw. |
Definition at line 206 of file stack.c.
References _MetaStack::freeze_count, and stack_sync_to_server().
Referenced by meta_group_update_layers(), meta_screen_composite_all_windows(), meta_screen_manage_all_windows(), meta_window_free(), meta_window_make_fullscreen_internal(), meta_window_new_with_attrs(), and meta_window_update_layer().
| void meta_stack_update_layer | ( | MetaStack * | stack, | |
| MetaWindow * | window | |||
| ) |
Recalculates the correct layer for all windows in the stack, and moves them about accordingly.
| window | Dummy parameter | |
| stack | The stack to recalculate |
Definition at line 162 of file stack.c.
References _MetaStack::need_relayer, stack_sync_to_server(), and TRUE.
Referenced by meta_group_update_layers(), and meta_window_update_layer().
| void meta_stack_update_transient | ( | MetaStack * | stack, | |
| MetaWindow * | window | |||
| ) |
Recalculates the correct stacking order for all windows in the stack according to their transience, and moves them about accordingly.
| window | Dummy parameter | |
| stack | The stack to recalculate |
Definition at line 171 of file stack.c.
References _MetaStack::need_constrain, stack_sync_to_server(), and TRUE.
Referenced by reload_transient_for().
| int meta_stack_windows_cmp | ( | MetaStack * | stack, | |
| MetaWindow * | window_a, | |||
| MetaWindow * | window_b | |||
| ) |
Comparison function for windows within a stack.
This is not directly suitable for use within a standard comparison routine, because it takes an extra parameter; you will need to wrap it.
(FIXME: We could remove the stack parameter and use the stack of the screen of window A, and complain if the stack of the screen of window B differed; then this would be a usable general comparison function.)
(FIXME: Apparently identical to compare_window_position(). Merge them.)
| stack | A stack containing both window_a and window_b | |
| window_a | A window | |
| window_b | Another window |
Definition at line 1475 of file stack.c.
References _MetaWindow::layer, _MetaWindow::screen, stack_ensure_sorted(), and _MetaWindow::stack_position.
Referenced by meta_display_stack_cmp(), and stackcmp().
| void meta_window_set_stack_position | ( | MetaWindow * | window, | |
| int | position | |||
| ) |
Sets the position of a window within the stack.
This will only move it up or down within its layer. It is an error to attempt to move this below position zero or above the last position in the stack (however, since we don't provide a simple way to tell the number of windows in the stack, this requirement may not be easy to fulfil).
| window | The window which is moving. | |
| position | Where it should move to (0 is the bottom). |
Definition at line 1656 of file stack.c.
References meta_window_set_stack_position_no_sync(), _MetaWindow::screen, _MetaScreen::stack, and stack_sync_to_server().
Referenced by meta_window_stack_just_below().
| void meta_window_set_stack_position_no_sync | ( | MetaWindow * | window, | |
| int | position | |||
| ) | [static] |
Definition at line 1602 of file stack.c.
References _MetaWindow::desc, META_DEBUG_STACK, _MetaStack::need_constrain, _MetaStack::need_resort, NULL, screen, _MetaWindow::screen, _MetaStack::sorted, _MetaScreen::stack, _MetaWindow::stack_position, and TRUE.
Referenced by ensure_above(), meta_stack_lower(), meta_stack_raise(), meta_stack_remove(), and meta_window_set_stack_position().
| static void raise_window_relative_to_managed_windows | ( | MetaScreen * | screen, | |
| Window | xwindow | |||
| ) | [static] |
This function is used to avoid raising a window above popup menus and other such things.
FIXME This is sort of an expensive function, should probably do something to avoid it. One approach would be to reverse the stacking algorithm to work by placing each window above the others, and start by lowering a window to the bottom (instead of the current way, which works by placing each window below another and starting with a raise)
Definition at line 953 of file stack.c.
References changes, _MetaScreen::display, FALSE, META_DEBUG_STACK, meta_display_lookup_x_window(), meta_error_trap_pop(), meta_error_trap_pop_with_return(), meta_error_trap_push(), meta_error_trap_push_with_return(), NULL, TRUE, _MetaDisplay::xdisplay, and _MetaScreen::xroot.
Referenced by stack_sync_to_server().
| static void stack_do_constrain | ( | MetaStack * | stack | ) | [static] |
Update stack_position and layer to reflect transiency constraints.
Definition at line 877 of file stack.c.
References apply_constraints(), create_constraints(), FALSE, free_constraints(), graph_constraints(), META_DEBUG_STACK, _MetaStack::n_positions, _MetaStack::need_constrain, and _MetaStack::sorted.
Referenced by stack_ensure_sorted().
| static void stack_do_relayer | ( | MetaStack * | stack | ) | [static] |
Update the layers that windows are in.
Definition at line 830 of file stack.c.
References compute_layer(), _MetaWindow::desc, FALSE, _MetaWindow::layer, META_DEBUG_STACK, _MetaStack::need_constrain, _MetaStack::need_relayer, _MetaStack::need_resort, NULL, _MetaStack::sorted, and TRUE.
Referenced by stack_ensure_sorted().
| static void stack_do_resort | ( | MetaStack * | stack | ) | [static] |
Sort stack->sorted with layers having priority over stack_position.
Definition at line 908 of file stack.c.
References compare_window_position(), FALSE, META_DEBUG_STACK, _MetaStack::need_resort, and _MetaStack::sorted.
Referenced by stack_ensure_sorted().
| static void stack_do_window_additions | ( | MetaStack * | stack | ) | [static] |
Definition at line 775 of file stack.c.
References _MetaStack::added, META_DEBUG_STACK, _MetaStack::need_constrain, _MetaStack::need_relayer, _MetaStack::need_resort, NULL, _MetaStack::sorted, TRUE, _MetaStack::windows, and _MetaWindow::xwindow.
Referenced by stack_ensure_sorted().
| static void stack_do_window_deletions | ( | MetaStack * | stack | ) | [static] |
Go through "deleted" and take the matching windows out of "windows".
Definition at line 731 of file stack.c.
References NULL, _MetaStack::removed, and _MetaStack::windows.
Referenced by stack_ensure_sorted().
| static void stack_ensure_sorted | ( | MetaStack * | stack | ) | [static] |
Puts the stack into canonical form.
Honour the removed and added lists of the stack, and then recalculate all the layers (if the flag is set), re-run all the constraint calculations (if the flag is set), and finally re-sort the stack (if the flag is set, and if it wasn't already it might have become so during all the previous activity).
Definition at line 932 of file stack.c.
References stack_do_constrain(), stack_do_relayer(), stack_do_resort(), stack_do_window_additions(), and stack_do_window_deletions().
Referenced by get_default_focus_window(), meta_stack_get_above(), meta_stack_get_below(), meta_stack_get_bottom(), meta_stack_get_positions(), meta_stack_get_top(), meta_stack_list_windows(), meta_stack_set_positions(), meta_stack_windows_cmp(), and stack_sync_to_server().
| static void stack_sync_to_server | ( | MetaStack * | stack | ) | [static] |
Order the windows on the X server to be the same as in our structure.
We do this using XRestackWindows if we don't know the previous order, or XConfigureWindow on a few particular windows if we do and can figure out the minimum set of changes. After that, we set __NET_CLIENT_LIST and __NET_CLIENT_LIST_STACKING.
Definition at line 1049 of file stack.c.
References changes, _MetaWindow::desc, _MetaScreen::display, FALSE, _MetaWindow::frame, _MetaStack::freeze_count, _MetaStack::last_root_children_stacked, _MetaWindow::layer, meta_bug(), META_DEBUG_STACK, meta_display_lookup_x_window(), meta_error_trap_pop(), meta_error_trap_push(), meta_pop_no_msg_prefix(), meta_push_no_msg_prefix(), NULL, raise_window_relative_to_managed_windows(), _MetaStack::screen, _MetaStack::sorted, stack_ensure_sorted(), _MetaWindow::stack_position, TRUE, _MetaStack::windows, _MetaDisplay::xdisplay, _MetaScreen::xroot, _MetaFrame::xwindow, and _MetaWindow::xwindow.
Referenced by meta_stack_add(), meta_stack_lower(), meta_stack_raise(), meta_stack_remove(), meta_stack_set_positions(), meta_stack_thaw(), meta_stack_update_layer(), meta_stack_update_transient(), and meta_window_set_stack_position().
| static void traverse_constraint | ( | Constraint * | c | ) | [static] |
Definition at line 666 of file stack.c.
References Constraint::above, Constraint::applied, Constraint::below, ensure_above(), Constraint::next_nodes, NULL, and TRUE.
Referenced by apply_constraints().
| static gboolean window_contains_point | ( | MetaWindow * | window, | |
| int | root_x, | |||
| int | root_y | |||
| ) | [static] |
Definition at line 1319 of file stack.c.
References meta_window_get_outer_rect(), and POINT_IN_RECT.
Referenced by get_default_focus_window().
| static gboolean windows_on_different_xinerama | ( | MetaWindow * | a, | |
| MetaWindow * | b | |||
| ) | [static] |
Definition at line 227 of file stack.c.
References meta_screen_get_xinerama_for_window(), _MetaWindow::screen, and TRUE.
Referenced by get_standalone_layer().
1.5.5