Go to the source code of this file.
| typedef gboolean(* ConstraintFunc)(MetaWindow *window, ConstraintInfo *info, ConstraintPriority priority, gboolean check_only) |
Definition at line 201 of file constraints.c.
| enum ActionType |
Definition at line 107 of file constraints.c.
| enum ConstraintPriority |
Definition at line 92 of file constraints.c.
| static gboolean constrain_aspect_ratio | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 929 of file constraints.c.
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, ConstraintInfo::orig, PRIORITY_ASPECT_RATIO, ConstraintInfo::resize_gravity, _MetaWindow::size_hints, TRUE, and _MetaRectangle::width.
| static gboolean constrain_fullscreen | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 773 of file constraints.c.
References ConstraintInfo::current, ConstraintInfo::entire_xinerama, FALSE, ConstraintInfo::fgeom, _MetaWindow::fullscreen, get_size_limits(), meta_rectangle_could_fit_rect(), meta_rectangle_equal(), PRIORITY_FULLSCREEN, and TRUE.
| static gboolean constrain_fully_onscreen | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 1166 of file constraints.c.
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 gboolean constrain_maximization | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 689 of file constraints.c.
References _MetaScreen::active_workspace, _MetaWorkspace::all_struts, ConstraintInfo::current, ConstraintInfo::entire_xinerama, extend_by_frame(), FALSE, ConstraintInfo::fgeom, get_size_limits(), _MetaRectangle::height, _MetaWindow::maximized_horizontally, _MetaWindow::maximized_vertically, META_DIRECTION_HORIZONTAL, META_DIRECTION_VERTICAL, meta_rectangle_expand_to_avoiding_struts(), PRIORITY_MAXIMIZATION, _MetaWindow::screen, TRUE, unextend_by_frame(), _MetaRectangle::width, ConstraintInfo::work_area_xinerama, _MetaRectangle::x, and _MetaRectangle::y.
| static gboolean constrain_partially_onscreen | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 1278 of file constraints.c.
References _MetaFrameGeometry::bottom_height, ConstraintInfo::current, do_screen_and_xinerama_relative_constraints(), ConstraintInfo::fgeom, _MetaWindow::frame, _MetaRectangle::height, meta_rectangle_expand_region_conditionally(), META_WINDOW_DESKTOP, META_WINDOW_DOCK, PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA, _MetaFrameGeometry::top_height, TRUE, _MetaWindow::type, ConstraintInfo::usable_screen_region, and _MetaRectangle::width.
| static gboolean constrain_size_increments | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 806 of file constraints.c.
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, ConstraintInfo::orig, PRIORITY_SIZE_HINTS_INCREMENTS, ConstraintInfo::resize_gravity, _MetaWindow::size_hints, TRUE, and _MetaRectangle::width.
| static gboolean constrain_size_limits | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 874 of file constraints.c.
References ACTION_MOVE, ACTION_MOVE_AND_RESIZE, ConstraintInfo::action_type, ConstraintInfo::current, FALSE, ConstraintInfo::fgeom, 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 gboolean constrain_titlebar_visible | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 1193 of file constraints.c.
References _MetaFrameGeometry::bottom_height, ConstraintInfo::current, _MetaWindow::decorated, _MetaWindow::display, do_screen_and_xinerama_relative_constraints(), ConstraintInfo::fgeom, _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, _MetaFrameGeometry::top_height, TRUE, _MetaWindow::type, ConstraintInfo::usable_screen_region, and _MetaRectangle::width.
| static gboolean constrain_to_single_xinerama | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 1137 of file constraints.c.
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 gboolean do_all_constraints | ( | MetaWindow * | window, | |
| ConstraintInfo * | info, | |||
| ConstraintPriority | priority, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 225 of file constraints.c.
References 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 gboolean do_screen_and_xinerama_relative_constraints | ( | MetaWindow * | window, | |
| GList * | region_spanning_rectangles, | |||
| ConstraintInfo * | info, | |||
| gboolean | check_only | |||
| ) | [static] |
Definition at line 1063 of file constraints.c.
References ACTION_MOVE, ACTION_RESIZE, ConstraintInfo::action_type, ConstraintInfo::current, extend_by_frame(), FALSE, ConstraintInfo::fgeom, 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 void extend_by_frame | ( | MetaRectangle * | rect, | |
| const MetaFrameGeometry * | fgeom | |||
| ) | [static] |
Definition at line 642 of file constraints.c.
References _MetaFrameGeometry::bottom_height, _MetaRectangle::height, _MetaFrameGeometry::left_width, _MetaFrameGeometry::right_width, _MetaFrameGeometry::top_height, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by constrain_maximization(), do_screen_and_xinerama_relative_constraints(), and update_onscreen_requirements().
| static void get_size_limits | ( | const MetaWindow * | window, | |
| const MetaFrameGeometry * | fgeom, | |||
| gboolean | include_frame, | |||
| MetaRectangle * | min_size, | |||
| MetaRectangle * | max_size | |||
| ) | [inline, static] |
Definition at line 662 of file constraints.c.
References _MetaFrameGeometry::bottom_height, _MetaRectangle::height, _MetaFrameGeometry::left_width, _MetaFrameGeometry::right_width, _MetaWindow::size_hints, _MetaFrameGeometry::top_height, and _MetaRectangle::width.
Referenced by constrain_fullscreen(), constrain_maximization(), constrain_size_limits(), and do_screen_and_xinerama_relative_constraints().
| void meta_window_constrain | ( | MetaWindow * | window, | |
| MetaFrameGeometry * | orig_fgeom, | |||
| MetaMoveResizeFlags | flags, | |||
| int | resize_gravity, | |||
| const MetaRectangle * | orig, | |||
| MetaRectangle * | new | |||
| ) |
Definition at line 264 of file constraints.c.
References ConstraintInfo::current, _MetaWindow::desc, do_all_constraints(), FALSE, ConstraintInfo::fgeom, _MetaRectangle::height, META_DEBUG_GEOMETRY, 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 void place_window_if_needed | ( | MetaWindow * | window, | |
| ConstraintInfo * | info | |||
| ) | [static] |
Definition at line 456 of file constraints.c.
References _MetaScreen::active_workspace, _MetaWindow::calc_placement, ConstraintInfo::current, ConstraintInfo::entire_xinerama, FALSE, ConstraintInfo::fgeom, FIXED_DIRECTION_NONE, ConstraintInfo::fixed_directions, _MetaWindow::frame, _MetaWindow::fullscreen, _MetaRectangle::height, _MetaWindow::maximize_horizontally_after_placement, _MetaWindow::maximize_vertically_after_placement, _MetaWindow::maximized_horizontally, _MetaWindow::maximized_vertically, meta_frame_calc_geometry(), 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::screen, TRUE, ConstraintInfo::usable_xinerama_region, _MetaRectangle::width, ConstraintInfo::work_area_xinerama, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_window_constrain().
| static void setup_constraint_info | ( | ConstraintInfo * | info, | |
| MetaWindow * | window, | |||
| MetaFrameGeometry * | orig_fgeom, | |||
| MetaMoveResizeFlags | flags, | |||
| int | resize_gravity, | |||
| const MetaRectangle * | orig, | |||
| MetaRectangle * | new | |||
| ) | [static] |
Definition at line 328 of file constraints.c.
References ACTION_MOVE, ACTION_MOVE_AND_RESIZE, ACTION_RESIZE, ConstraintInfo::action_type, _MetaScreen::active_workspace, _MetaFrameGeometry::bottom_height, ConstraintInfo::current, _MetaWindow::desc, ConstraintInfo::entire_xinerama, ConstraintInfo::fgeom, FIXED_DIRECTION_NONE, FIXED_DIRECTION_X, FIXED_DIRECTION_Y, ConstraintInfo::fixed_directions, _MetaWindow::fullscreen, _MetaWindow::has_fullscreen_func, _MetaRectangle::height, ConstraintInfo::is_user_action, _MetaFrameGeometry::left_width, META_DEBUG_GEOMETRY, meta_gravity_to_string(), META_IS_MOVE_ACTION, META_IS_RESIZE_ACTION, META_IS_USER_ACTION, meta_rectangle_equal(), meta_screen_get_xinerama_for_rect(), meta_warning(), meta_window_get_work_area_for_xinerama(), meta_window_make_fullscreen_internal(), meta_workspace_get_onscreen_region(), meta_workspace_get_onxinerama_region(), _MetaXineramaScreenInfo::number, ConstraintInfo::orig, _MetaXineramaScreenInfo::rect, ConstraintInfo::resize_gravity, _MetaFrameGeometry::right_width, _MetaWindow::screen, _MetaFrameGeometry::top_height, ConstraintInfo::usable_screen_region, ConstraintInfo::usable_xinerama_region, _MetaRectangle::width, ConstraintInfo::work_area_xinerama, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_window_constrain().
| static void unextend_by_frame | ( | MetaRectangle * | rect, | |
| const MetaFrameGeometry * | fgeom | |||
| ) | [static] |
Definition at line 652 of file constraints.c.
References _MetaFrameGeometry::bottom_height, _MetaRectangle::height, _MetaFrameGeometry::left_width, _MetaFrameGeometry::right_width, _MetaFrameGeometry::top_height, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by constrain_maximization(), do_screen_and_xinerama_relative_constraints(), and update_onscreen_requirements().
| static void update_onscreen_requirements | ( | MetaWindow * | window, | |
| ConstraintInfo * | info | |||
| ) | [static] |
Definition at line 551 of file constraints.c.
References ConstraintInfo::current, _MetaWindow::decorated, _MetaWindow::desc, extend_by_frame(), ConstraintInfo::fgeom, _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, _MetaFrameGeometry::top_height, _MetaWindow::type, unextend_by_frame(), ConstraintInfo::usable_screen_region, and ConstraintInfo::usable_xinerama_region.
Referenced by meta_window_constrain().
const Constraint all_constraints[] [static] |
Initial value:
{
{constrain_maximization, "constrain_maximization"},
{constrain_fullscreen, "constrain_fullscreen"},
{constrain_size_increments, "constrain_size_increments"},
{constrain_size_limits, "constrain_size_limits"},
{constrain_aspect_ratio, "constrain_aspect_ratio"},
{constrain_to_single_xinerama, "constrain_to_single_xinerama"},
{constrain_fully_onscreen, "constrain_fully_onscreen"},
{constrain_titlebar_visible, "constrain_titlebar_visible"},
{constrain_partially_onscreen, "constrain_partially_onscreen"},
{NULL, NULL}
}
Definition at line 211 of file constraints.c.
1.5.5