|
marco 1.29.1
Window manager
|
#include <config.h>#include "constraints.h"#include "workspace.h"#include "place.h"#include "prefs.h"#include <stdlib.h>#include <math.h>Data Structures | |
| struct | ConstraintInfo |
| struct | Constraint |
Macros | |
| #define | _GNU_SOURCE |
Typedefs | |
| typedef gboolean(* | ConstraintFunc) (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
Enumerations | |
| enum | ConstraintPriority { PRIORITY_MINIMUM = 0 , PRIORITY_ASPECT_RATIO = 0 , PRIORITY_ENTIRELY_VISIBLE_ON_SINGLE_XINERAMA = 0 , PRIORITY_ENTIRELY_VISIBLE_ON_WORKAREA = 1 , PRIORITY_SIZE_HINTS_INCREMENTS = 1 , PRIORITY_MAXIMIZATION = 2 , PRIORITY_TILING = 2 , PRIORITY_FULLSCREEN = 2 , PRIORITY_SIZE_HINTS_LIMITS = 3 , PRIORITY_TITLEBAR_VISIBLE = 4 , PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA = 4 , PRIORITY_MAXIMUM = 4 } |
| enum | ActionType { ACTION_MOVE , ACTION_RESIZE , ACTION_MOVE_AND_RESIZE } |
Functions | |
| static gboolean | constrain_modal_dialog (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_maximization (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_tiling (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_fullscreen (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_size_increments (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_size_limits (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_aspect_ratio (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_to_single_xinerama (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_fully_onscreen (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_titlebar_visible (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static gboolean | constrain_partially_onscreen (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| static void | setup_constraint_info (ConstraintInfo *info, MetaWindow *window, MetaFrameBorders *orig_borders, MetaMoveResizeFlags flags, int resize_gravity, const MetaRectangle *orig, MetaRectangle *new) |
| static void | place_window_if_needed (MetaWindow *window, ConstraintInfo *info) |
| static void | update_onscreen_requirements (MetaWindow *window, ConstraintInfo *info) |
| static void | extend_by_frame (MetaWindow *window, MetaRectangle *rect, const MetaFrameBorders *borders) |
| static void | unextend_by_frame (MetaWindow *window, MetaRectangle *rect, const MetaFrameBorders *borders) |
| static void | get_size_limits (const MetaWindow *window, const MetaFrameBorders *borders, gboolean include_frame, MetaRectangle *min_size, MetaRectangle *max_size) |
| static void | can_resize_tiled (guint tile_mode, int resize_gravity, gboolean *resize_horizontally, gboolean *resize_vertically) |
| static gboolean | do_all_constraints (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| void | meta_window_constrain (MetaWindow *window, MetaFrameBorders *orig_borders, MetaMoveResizeFlags flags, int resize_gravity, const MetaRectangle *orig, MetaRectangle *new) |
| static gboolean | do_screen_and_xinerama_relative_constraints (MetaWindow *window, GList *region_spanning_rectangles, ConstraintInfo *info, gboolean check_only) |
Variables | |
| static const Constraint | all_constraints [] |
| #define _GNU_SOURCE |
| typedef gboolean(* ConstraintFunc) (MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
| enum ActionType |
| enum ConstraintPriority |
|
static |
References META_TILE_BOTTOM_LEFT, META_TILE_BOTTOM_RIGHT, META_TILE_LEFT, META_TILE_RIGHT, META_TILE_TOP_LEFT, META_TILE_TOP_RIGHT, and TRUE.
Referenced by constrain_tiling().
|
static |
References ACTION_MOVE, ACTION_MOVE_AND_RESIZE, ConstraintInfo::action_type, ConstraintInfo::current, _MetaWindow::fullscreen, _MetaRectangle::height, meta_rectangle_find_linepoint_closest_to_point(), meta_rectangle_resize_with_gravity(), META_WINDOW_MAXIMIZED, META_WINDOW_SIDE_TILED, ConstraintInfo::orig, PRIORITY_ASPECT_RATIO, ConstraintInfo::resize_gravity, _MetaWindow::size_hints, TRUE, and _MetaRectangle::width.
|
static |
References ConstraintInfo::borders, ConstraintInfo::current, ConstraintInfo::entire_xinerama, FALSE, _MetaWindow::fullscreen, get_size_limits(), meta_rectangle_could_fit_rect(), meta_rectangle_equal(), PRIORITY_FULLSCREEN, and TRUE.
|
static |
References do_screen_and_xinerama_relative_constraints(), _MetaWindow::fullscreen, ConstraintInfo::is_user_action, META_WINDOW_DESKTOP, META_WINDOW_DOCK, PRIORITY_ENTIRELY_VISIBLE_ON_WORKAREA, _MetaWindow::require_fully_onscreen, TRUE, _MetaWindow::type, and ConstraintInfo::usable_screen_region.
|
static |
References _MetaScreen::active_workspace, _MetaWorkspace::all_struts, ConstraintInfo::borders, ConstraintInfo::current, ConstraintInfo::entire_xinerama, extend_by_frame(), FALSE, get_size_limits(), _MetaRectangle::height, _MetaWindow::maximized_horizontally, _MetaWindow::maximized_vertically, META_DIRECTION_HORIZONTAL, META_DIRECTION_VERTICAL, meta_rectangle_expand_to_avoiding_struts(), META_WINDOW_MAXIMIZED, META_WINDOW_TILED, PRIORITY_MAXIMIZATION, _MetaWindow::screen, TRUE, unextend_by_frame(), _MetaRectangle::width, ConstraintInfo::work_area_xinerama, _MetaRectangle::x, and _MetaRectangle::y.
|
static |
References ConstraintInfo::borders, ConstraintInfo::current, _MetaWindow::frame, meta_frame_calc_borders(), meta_prefs_get_attach_modal_dialogs(), meta_window_get_transient_for(), META_WINDOW_MODAL_DIALOG, _MetaFrame::rect, _MetaWindow::rect, _MetaFrameBorders::total, TRUE, _MetaWindow::type, _MetaFrameBorders::visible, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
|
static |
References ConstraintInfo::borders, ConstraintInfo::current, do_screen_and_xinerama_relative_constraints(), _MetaWindow::frame, _MetaRectangle::height, meta_rectangle_expand_region_conditionally(), META_WINDOW_DESKTOP, META_WINDOW_DOCK, PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA, TRUE, _MetaWindow::type, ConstraintInfo::usable_screen_region, _MetaFrameBorders::visible, and _MetaRectangle::width.
|
static |
References ACTION_MOVE, ACTION_MOVE_AND_RESIZE, ConstraintInfo::action_type, ConstraintInfo::current, _MetaWindow::fullscreen, _MetaRectangle::height, _MetaWindow::maximized_horizontally, _MetaWindow::maximized_vertically, meta_rectangle_resize_with_gravity(), META_WINDOW_MAXIMIZED, META_WINDOW_TILED, ConstraintInfo::orig, PRIORITY_SIZE_HINTS_INCREMENTS, ConstraintInfo::resize_gravity, _MetaWindow::size_hints, TRUE, and _MetaRectangle::width.
|
static |
References ACTION_MOVE, ACTION_MOVE_AND_RESIZE, ConstraintInfo::action_type, ConstraintInfo::borders, ConstraintInfo::current, FALSE, get_size_limits(), _MetaRectangle::height, _MetaWindow::maximized_horizontally, _MetaWindow::maximized_vertically, meta_rectangle_could_fit_rect(), meta_rectangle_resize_with_gravity(), ConstraintInfo::orig, PRIORITY_SIZE_HINTS_LIMITS, ConstraintInfo::resize_gravity, TRUE, and _MetaRectangle::width.
|
static |
References ConstraintInfo::borders, can_resize_tiled(), ConstraintInfo::current, FALSE, get_size_limits(), _MetaRectangle::height, ConstraintInfo::is_user_action, meta_window_get_current_tile_area(), META_WINDOW_TILED, ConstraintInfo::orig, PRIORITY_TILING, ConstraintInfo::resize_gravity, _MetaWindow::tile_mode, _MetaWindow::tile_resized, TRUE, unextend_by_frame(), _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
|
static |
References ConstraintInfo::borders, ConstraintInfo::current, _MetaWindow::display, do_screen_and_xinerama_relative_constraints(), _MetaWindow::frame, _MetaWindow::fullscreen, _MetaDisplay::grab_frame_action, _MetaRectangle::height, ConstraintInfo::is_user_action, meta_rectangle_expand_region_conditionally(), META_WINDOW_DESKTOP, META_WINDOW_DOCK, PRIORITY_TITLEBAR_VISIBLE, _MetaWindow::require_titlebar_visible, TRUE, _MetaWindow::type, ConstraintInfo::usable_screen_region, _MetaFrameBorders::visible, and _MetaRectangle::width.
|
static |
References do_screen_and_xinerama_relative_constraints(), _MetaWindow::frame, ConstraintInfo::is_user_action, META_WINDOW_DESKTOP, META_WINDOW_DOCK, _MetaScreen::n_xinerama_infos, PRIORITY_ENTIRELY_VISIBLE_ON_SINGLE_XINERAMA, _MetaWindow::require_on_single_xinerama, _MetaWindow::screen, TRUE, _MetaWindow::type, and ConstraintInfo::usable_xinerama_region.
|
static |
References all_constraints, ConstraintInfo::current, FALSE, Constraint::func, _MetaRectangle::height, META_DEBUG_GEOMETRY, Constraint::name, NULL, TRUE, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_window_constrain().
|
static |
References ACTION_MOVE, ACTION_RESIZE, ConstraintInfo::action_type, ConstraintInfo::borders, ConstraintInfo::current, extend_by_frame(), FALSE, FIXED_DIRECTION_X, FIXED_DIRECTION_Y, ConstraintInfo::fixed_directions, get_size_limits(), _MetaRectangle::height, ConstraintInfo::is_user_action, META_DEBUG_GEOMETRY, meta_is_verbose(), meta_rectangle_clamp_to_fit_into_region(), meta_rectangle_clip_to_region(), meta_rectangle_contained_in_region(), meta_rectangle_could_fit_in_region(), meta_rectangle_region_to_string(), meta_rectangle_shove_into_region(), TRUE, unextend_by_frame(), and _MetaRectangle::width.
Referenced by constrain_fully_onscreen(), constrain_partially_onscreen(), constrain_titlebar_visible(), and constrain_to_single_xinerama().
|
static |
References _MetaWindow::custom_frame_extents, _MetaWindow::frame, _MetaRectangle::height, _MetaFrameBorders::visible, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by constrain_maximization(), do_screen_and_xinerama_relative_constraints(), and update_onscreen_requirements().
|
inlinestatic |
References _MetaWindow::custom_frame_extents, _MetaWindow::frame, _MetaRectangle::height, _MetaWindow::size_hints, _MetaFrameBorders::visible, and _MetaRectangle::width.
Referenced by constrain_fullscreen(), constrain_maximization(), constrain_size_limits(), constrain_tiling(), and do_screen_and_xinerama_relative_constraints().
| void meta_window_constrain | ( | MetaWindow * | window, |
| MetaFrameBorders * | orig_borders, | ||
| MetaMoveResizeFlags | flags, | ||
| int | resize_gravity, | ||
| const MetaRectangle * | orig, | ||
| MetaRectangle * | new | ||
| ) |
References ConstraintInfo::borders, ConstraintInfo::current, _MetaWindow::desc, do_all_constraints(), FALSE, _MetaRectangle::height, META_DEBUG_GEOMETRY, ConstraintInfo::must_free_borders, place_window_if_needed(), PRIORITY_MAXIMUM, PRIORITY_MINIMUM, setup_constraint_info(), TRUE, update_onscreen_requirements(), _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_window_move_resize_internal().
|
static |
References _MetaScreen::active_workspace, ConstraintInfo::borders, _MetaWindow::calc_placement, ConstraintInfo::current, ConstraintInfo::entire_xinerama, FALSE, FIXED_DIRECTION_NONE, ConstraintInfo::fixed_directions, _MetaWindow::frame, _MetaWindow::fullscreen, _MetaWindow::fullscreen_after_placement, _MetaRectangle::height, _MetaWindow::maximize_horizontally_after_placement, _MetaWindow::maximize_vertically_after_placement, _MetaWindow::maximized_horizontally, _MetaWindow::maximized_vertically, meta_frame_calc_borders(), META_MAXIMIZE_HORIZONTAL, META_MAXIMIZE_VERTICAL, meta_screen_get_xinerama_for_rect(), meta_window_get_work_area_for_xinerama(), meta_window_maximize_internal(), meta_window_minimize(), meta_window_place(), meta_workspace_get_onxinerama_region(), _MetaWindow::minimize_after_placement, _MetaWindow::minimized, _MetaXineramaScreenInfo::number, ConstraintInfo::orig, _MetaWindow::placed, _MetaXineramaScreenInfo::rect, _MetaWindow::saved_rect, _MetaWindow::screen, TRUE, ConstraintInfo::usable_xinerama_region, _MetaWindow::user_rect, _MetaRectangle::width, ConstraintInfo::work_area_xinerama, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_window_constrain().
|
static |
References ACTION_MOVE, ACTION_MOVE_AND_RESIZE, ACTION_RESIZE, ConstraintInfo::action_type, _MetaScreen::active_workspace, ConstraintInfo::borders, ConstraintInfo::current, ConstraintInfo::entire_xinerama, FALSE, FIXED_DIRECTION_NONE, FIXED_DIRECTION_X, FIXED_DIRECTION_Y, ConstraintInfo::fixed_directions, _MetaWindow::fullscreen, _MetaWindow::fullscreen_monitors, _MetaRectangle::height, ConstraintInfo::is_user_action, META_DEBUG_GEOMETRY, meta_gravity_to_string(), META_IS_MOVE_ACTION, META_IS_RESIZE_ACTION, META_IS_USER_ACTION, meta_rectangle_union(), meta_screen_get_xinerama_for_rect(), meta_window_get_work_area_for_xinerama(), meta_workspace_get_onscreen_region(), meta_workspace_get_onxinerama_region(), ConstraintInfo::must_free_borders, _MetaXineramaScreenInfo::number, ConstraintInfo::orig, _MetaXineramaScreenInfo::rect, ConstraintInfo::resize_gravity, _MetaWindow::screen, TRUE, ConstraintInfo::usable_screen_region, ConstraintInfo::usable_xinerama_region, _MetaRectangle::width, ConstraintInfo::work_area_xinerama, _MetaRectangle::x, _MetaScreen::xinerama_infos, and _MetaRectangle::y.
Referenced by meta_window_constrain().
|
static |
References _MetaWindow::custom_frame_extents, _MetaWindow::frame, _MetaRectangle::height, _MetaFrameBorders::visible, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by constrain_maximization(), constrain_tiling(), do_screen_and_xinerama_relative_constraints(), and update_onscreen_requirements().
|
static |
References ConstraintInfo::borders, ConstraintInfo::current, _MetaWindow::decorated, _MetaWindow::desc, extend_by_frame(), FALSE, _MetaWindow::frame, _MetaWindow::fullscreen, _MetaRectangle::height, META_DEBUG_GEOMETRY, meta_rectangle_contained_in_region(), meta_rectangle_overlaps_with_region(), META_WINDOW_DESKTOP, META_WINDOW_DOCK, _MetaWindow::require_fully_onscreen, _MetaWindow::require_on_single_xinerama, _MetaWindow::require_titlebar_visible, _MetaWindow::type, unextend_by_frame(), ConstraintInfo::usable_screen_region, ConstraintInfo::usable_xinerama_region, and _MetaFrameBorders::visible.
Referenced by meta_window_constrain().
|
static |
Referenced by do_all_constraints().