mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -05:00
Rename meta_window_get_outer_rect() to meta_window_get_frame_rect()
For clarity, rename meta_window_get_outer_rect() to match terminology we use elsewhere. The old function is left as a deprecated compatibility wrapper.
This commit is contained in:
parent
097ee776c7
commit
b9da43b753
@ -541,6 +541,7 @@ meta_window_is_override_redirect
|
||||
meta_window_is_skip_taskbar
|
||||
meta_window_get_rect
|
||||
meta_window_get_input_rect
|
||||
meta_window_get_frame_rect
|
||||
meta_window_get_outer_rect
|
||||
meta_window_client_rect_to_frame_rect
|
||||
meta_window_frame_rect_to_client_rect
|
||||
|
@ -864,7 +864,7 @@ meta_shape_cow_for_window (MetaScreen *screen,
|
||||
int width, height;
|
||||
MetaRectangle rect;
|
||||
|
||||
meta_window_get_outer_rect (metaWindow, &rect);
|
||||
meta_window_get_frame_rect (metaWindow, &rect);
|
||||
|
||||
window_bounds.x = rect.x;
|
||||
window_bounds.y = rect.y;
|
||||
|
@ -2031,7 +2031,7 @@ check_needs_x11_pixmap (MetaWindowActor *self)
|
||||
|
||||
meta_surface_actor_set_texture (META_SURFACE_ACTOR (priv->surface), texture);
|
||||
|
||||
/* ::size-changed is supposed to refer to meta_window_get_outer_rect().
|
||||
/* ::size-changed is supposed to refer to meta_window_get_frame_rect().
|
||||
* Emitting it here works pretty much OK because a new value of the
|
||||
* *input* rect (which is the outer rect with the addition of invisible
|
||||
* borders) forces a new pixmap and we get here. In the rare case where
|
||||
@ -2128,7 +2128,7 @@ meta_window_actor_process_x11_damage (MetaWindowActor *self,
|
||||
if (meta_window_is_fullscreen (priv->window) && g_list_last (info->windows)->data == self && !priv->unredirected)
|
||||
{
|
||||
MetaRectangle window_rect;
|
||||
meta_window_get_outer_rect (priv->window, &window_rect);
|
||||
meta_window_get_frame_rect (priv->window, &window_rect);
|
||||
|
||||
if (window_rect.x == event->area.x &&
|
||||
window_rect.y == event->area.y &&
|
||||
|
@ -163,7 +163,7 @@ meta_window_group_paint (ClutterActor *actor)
|
||||
cairo_rectangle_int_t unredirected_rect;
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (info->unredirected_window);
|
||||
|
||||
meta_window_get_outer_rect (window, (MetaRectangle *)&unredirected_rect);
|
||||
meta_window_get_frame_rect (window, (MetaRectangle *)&unredirected_rect);
|
||||
cairo_region_subtract_rectangle (unobscured_region, &unredirected_rect);
|
||||
cairo_region_subtract_rectangle (clip_region, &unredirected_rect);
|
||||
}
|
||||
|
@ -497,7 +497,7 @@ place_window_if_needed(MetaWindow *window,
|
||||
MetaWorkspace *cur_workspace;
|
||||
const MetaMonitorInfo *monitor_info;
|
||||
|
||||
meta_window_get_outer_rect (window, &placed_rect);
|
||||
meta_window_get_frame_rect (window, &placed_rect);
|
||||
meta_window_place (window, info->orig.x, info->orig.y,
|
||||
&placed_rect.x, &placed_rect.y);
|
||||
did_placement = TRUE;
|
||||
@ -707,8 +707,8 @@ get_size_limits (MetaWindow *window,
|
||||
|
||||
if (include_frame)
|
||||
{
|
||||
meta_window_client_rect_to_outer_rect (window, min_size, min_size);
|
||||
meta_window_client_rect_to_outer_rect (window, max_size, max_size);
|
||||
meta_window_client_rect_to_frame_rect (window, min_size, min_size);
|
||||
meta_window_client_rect_to_frame_rect (window, max_size, max_size);
|
||||
}
|
||||
}
|
||||
|
||||
@ -735,7 +735,7 @@ constrain_modal_dialog (MetaWindow *window,
|
||||
child_rect = info->current;
|
||||
extend_by_frame (window, &child_rect);
|
||||
|
||||
meta_window_get_outer_rect (parent, &parent_rect);
|
||||
meta_window_get_frame_rect (parent, &parent_rect);
|
||||
|
||||
child_rect.x = parent_rect.x + (parent_rect.width / 2 - child_rect.width / 2);
|
||||
child_rect.y = parent_rect.y + (parent_rect.height / 2 - child_rect.height / 2);
|
||||
|
@ -1619,7 +1619,7 @@ window_raise_with_delay_callback (void *data)
|
||||
&root_x, &root_y, &x, &y, &mask);
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
meta_window_get_outer_rect (window, &frame_rect);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
point_in_window = POINT_IN_RECT (root_x, root_y, frame_rect);
|
||||
if (same_screen && point_in_window)
|
||||
meta_window_raise (window);
|
||||
@ -2177,7 +2177,7 @@ meta_display_handle_event (MetaDisplay *display,
|
||||
int root_x, root_y;
|
||||
MetaGrabOp op;
|
||||
|
||||
meta_window_get_outer_rect (window, &frame_rect);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
|
||||
west = event->button.x < (frame_rect.x + 1 * frame_rect.width / 3);
|
||||
east = event->button.x > (frame_rect.x + 2 * frame_rect.width / 3);
|
||||
|
@ -985,7 +985,7 @@ compute_resistance_and_snapping_edges (MetaDisplay *display)
|
||||
{
|
||||
MetaRectangle *new_rect;
|
||||
new_rect = g_new (MetaRectangle, 1);
|
||||
meta_window_get_outer_rect (cur_window, new_rect);
|
||||
meta_window_get_frame_rect (cur_window, new_rect);
|
||||
obscuring_windows = g_slist_prepend (obscuring_windows, new_rect);
|
||||
window_stacking =
|
||||
g_slist_prepend (window_stacking, GINT_TO_POINTER (stack_position));
|
||||
@ -1010,7 +1010,7 @@ compute_resistance_and_snapping_edges (MetaDisplay *display)
|
||||
{
|
||||
MetaRectangle cur_rect;
|
||||
MetaWindow *cur_window = cur_window_iter->data;
|
||||
meta_window_get_outer_rect (cur_window, &cur_rect);
|
||||
meta_window_get_frame_rect (cur_window, &cur_rect);
|
||||
|
||||
/* Check if we want to use this window's edges for edge
|
||||
* resistance (note that dock edges are considered screen edges
|
||||
@ -1151,7 +1151,7 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
MetaRectangle old_outer, proposed_outer, new_outer;
|
||||
gboolean is_resize;
|
||||
|
||||
meta_window_get_outer_rect (window, &old_outer);
|
||||
meta_window_get_frame_rect (window, &old_outer);
|
||||
|
||||
proposed_outer = old_outer;
|
||||
proposed_outer.x += (*new_x - old_x);
|
||||
@ -1237,7 +1237,7 @@ meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
int proposed_outer_width, proposed_outer_height;
|
||||
gboolean is_resize;
|
||||
|
||||
meta_window_get_outer_rect (window, &old_outer);
|
||||
meta_window_get_frame_rect (window, &old_outer);
|
||||
proposed_outer_width = old_outer.width + (*new_width - old_width);
|
||||
proposed_outer_height = old_outer.height + (*new_height - old_height);
|
||||
meta_rectangle_resize_with_gravity (&old_outer,
|
||||
|
@ -3125,17 +3125,17 @@ handle_move_to_corner_backend (MetaDisplay *display,
|
||||
gpointer dummy)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle outer;
|
||||
MetaRectangle frame_rect;
|
||||
int orig_x, orig_y;
|
||||
int new_x, new_y;
|
||||
|
||||
meta_window_get_work_area_all_monitors (window, &work_area);
|
||||
meta_window_get_outer_rect (window, &outer);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
meta_window_get_position (window, &orig_x, &orig_y);
|
||||
|
||||
if (xchange) {
|
||||
new_x = work_area.x + (to_right ?
|
||||
work_area.width - outer.width :
|
||||
work_area.width - frame_rect.width :
|
||||
0);
|
||||
} else {
|
||||
new_x = orig_x;
|
||||
@ -3143,7 +3143,7 @@ handle_move_to_corner_backend (MetaDisplay *display,
|
||||
|
||||
if (ychange) {
|
||||
new_y = work_area.y + (to_bottom ?
|
||||
work_area.height - outer.height :
|
||||
work_area.height - frame_rect.height :
|
||||
0);
|
||||
} else {
|
||||
new_y = orig_y;
|
||||
@ -3252,12 +3252,12 @@ handle_move_to_center (MetaDisplay *display,
|
||||
gpointer dummy)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle outer;
|
||||
MetaRectangle frame_rect;
|
||||
int orig_x, orig_y;
|
||||
int frame_width, frame_height;
|
||||
|
||||
meta_window_get_work_area_all_monitors (window, &work_area);
|
||||
meta_window_get_outer_rect (window, &outer);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
meta_window_get_position (window, &orig_x, &orig_y);
|
||||
|
||||
frame_width = (window->frame ? window->frame->child_x : 0);
|
||||
@ -3265,8 +3265,8 @@ handle_move_to_center (MetaDisplay *display,
|
||||
|
||||
meta_window_move_resize (window,
|
||||
TRUE,
|
||||
work_area.x + (work_area.width +frame_width -outer.width )/2,
|
||||
work_area.y + (work_area.height+frame_height-outer.height)/2,
|
||||
work_area.x + (work_area.width +frame_width -frame_rect.width )/2,
|
||||
work_area.y + (work_area.height+frame_height-frame_rect.height)/2,
|
||||
window->rect.width,
|
||||
window->rect.height);
|
||||
}
|
||||
@ -3958,8 +3958,8 @@ handle_raise_or_lower (MetaDisplay *display,
|
||||
|
||||
if (above->mapped)
|
||||
{
|
||||
meta_window_get_outer_rect (window, &win_rect);
|
||||
meta_window_get_outer_rect (above, &above_rect);
|
||||
meta_window_get_frame_rect (window, &win_rect);
|
||||
meta_window_get_frame_rect (above, &above_rect);
|
||||
|
||||
/* Check if obscured */
|
||||
if (meta_rectangle_intersect (&win_rect, &above_rect, &tmp))
|
||||
|
@ -53,8 +53,8 @@ northwestcmp (gconstpointer a, gconstpointer b)
|
||||
int from_origin_b;
|
||||
int ax, ay, bx, by;
|
||||
|
||||
meta_window_get_outer_rect (aw, &a_frame);
|
||||
meta_window_get_outer_rect (bw, &b_frame);
|
||||
meta_window_get_frame_rect (aw, &a_frame);
|
||||
meta_window_get_frame_rect (bw, &b_frame);
|
||||
ax = a_frame.x;
|
||||
ay = a_frame.y;
|
||||
bx = b_frame.x;
|
||||
@ -131,7 +131,7 @@ find_next_cascade (MetaWindow *window,
|
||||
|
||||
/* Find first cascade position that's not used. */
|
||||
|
||||
meta_window_get_outer_rect (window, &frame_rect);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
window_width = frame_rect.width;
|
||||
window_height = frame_rect.height;
|
||||
|
||||
@ -146,7 +146,7 @@ find_next_cascade (MetaWindow *window,
|
||||
w = tmp->data;
|
||||
|
||||
/* we want frame position, not window position */
|
||||
meta_window_get_outer_rect (w, &w_frame_rect);
|
||||
meta_window_get_frame_rect (w, &w_frame_rect);
|
||||
wx = w_frame_rect.x;
|
||||
wy = w_frame_rect.y;
|
||||
|
||||
@ -224,23 +224,23 @@ find_most_freespace (MetaWindow *window,
|
||||
int left_space, right_space, top_space, bottom_space;
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle avoid;
|
||||
MetaRectangle outer;
|
||||
MetaRectangle frame_rect;
|
||||
|
||||
meta_window_get_work_area_current_monitor (focus_window, &work_area);
|
||||
meta_window_get_outer_rect (focus_window, &avoid);
|
||||
meta_window_get_outer_rect (window, &outer);
|
||||
meta_window_get_frame_rect (focus_window, &avoid);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
|
||||
/* Find the areas of choosing the various sides of the focus window */
|
||||
max_width = MIN (avoid.width, outer.width);
|
||||
max_height = MIN (avoid.height, outer.height);
|
||||
max_width = MIN (avoid.width, frame_rect.width);
|
||||
max_height = MIN (avoid.height, frame_rect.height);
|
||||
left_space = avoid.x - work_area.x;
|
||||
right_space = work_area.width - (avoid.x + avoid.width - work_area.x);
|
||||
top_space = avoid.y - work_area.y;
|
||||
bottom_space = work_area.height - (avoid.y + avoid.height - work_area.y);
|
||||
left = MIN (left_space, outer.width);
|
||||
right = MIN (right_space, outer.width);
|
||||
top = MIN (top_space, outer.height);
|
||||
bottom = MIN (bottom_space, outer.height);
|
||||
left = MIN (left_space, frame_rect.width);
|
||||
right = MIN (right_space, frame_rect.width);
|
||||
top = MIN (top_space, frame_rect.height);
|
||||
bottom = MIN (bottom_space, frame_rect.height);
|
||||
|
||||
/* Find out which side of the focus_window can show the most of the window */
|
||||
side = META_LEFT;
|
||||
@ -273,31 +273,31 @@ find_most_freespace (MetaWindow *window,
|
||||
{
|
||||
case META_LEFT:
|
||||
*new_y = avoid.y;
|
||||
if (left_space > outer.width)
|
||||
*new_x = avoid.x - outer.width;
|
||||
if (left_space > frame_rect.width)
|
||||
*new_x = avoid.x - frame_rect.width;
|
||||
else
|
||||
*new_x = work_area.x;
|
||||
break;
|
||||
case META_RIGHT:
|
||||
*new_y = avoid.y;
|
||||
if (right_space > outer.width)
|
||||
if (right_space > frame_rect.width)
|
||||
*new_x = avoid.x + avoid.width;
|
||||
else
|
||||
*new_x = work_area.x + work_area.width - outer.width;
|
||||
*new_x = work_area.x + work_area.width - frame_rect.width;
|
||||
break;
|
||||
case META_TOP:
|
||||
*new_x = avoid.x;
|
||||
if (top_space > outer.height)
|
||||
*new_y = avoid.y - outer.height;
|
||||
if (top_space > frame_rect.height)
|
||||
*new_y = avoid.y - frame_rect.height;
|
||||
else
|
||||
*new_y = work_area.y;
|
||||
break;
|
||||
case META_BOTTOM:
|
||||
*new_x = avoid.x;
|
||||
if (bottom_space > outer.height)
|
||||
if (bottom_space > frame_rect.height)
|
||||
*new_y = avoid.y + avoid.height;
|
||||
else
|
||||
*new_y = work_area.y + work_area.height - outer.height;
|
||||
*new_y = work_area.y + work_area.height - frame_rect.height;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -312,8 +312,8 @@ window_overlaps_focus_window (MetaWindow *window)
|
||||
if (focus_window == NULL)
|
||||
return FALSE;
|
||||
|
||||
meta_window_get_outer_rect (window, &window_frame);
|
||||
meta_window_get_outer_rect (focus_window, &focus_frame);
|
||||
meta_window_get_frame_rect (window, &window_frame);
|
||||
meta_window_get_frame_rect (focus_window, &focus_frame);
|
||||
|
||||
return meta_rectangle_intersect (&window_frame,
|
||||
&focus_frame,
|
||||
@ -393,7 +393,7 @@ rectangle_overlaps_some_window (MetaRectangle *rect,
|
||||
case META_WINDOW_UTILITY:
|
||||
case META_WINDOW_TOOLBAR:
|
||||
case META_WINDOW_MENU:
|
||||
meta_window_get_outer_rect (other, &other_rect);
|
||||
meta_window_get_frame_rect (other, &other_rect);
|
||||
|
||||
if (meta_rectangle_intersect (rect, &other_rect, &dest))
|
||||
return TRUE;
|
||||
@ -415,8 +415,8 @@ leftmost_cmp (gconstpointer a, gconstpointer b)
|
||||
MetaRectangle b_frame;
|
||||
int ax, bx;
|
||||
|
||||
meta_window_get_outer_rect (aw, &a_frame);
|
||||
meta_window_get_outer_rect (bw, &b_frame);
|
||||
meta_window_get_frame_rect (aw, &a_frame);
|
||||
meta_window_get_frame_rect (bw, &b_frame);
|
||||
ax = a_frame.x;
|
||||
bx = b_frame.x;
|
||||
|
||||
@ -437,8 +437,8 @@ topmost_cmp (gconstpointer a, gconstpointer b)
|
||||
MetaRectangle b_frame;
|
||||
int ay, by;
|
||||
|
||||
meta_window_get_outer_rect (aw, &a_frame);
|
||||
meta_window_get_outer_rect (bw, &b_frame);
|
||||
meta_window_get_frame_rect (aw, &a_frame);
|
||||
meta_window_get_frame_rect (bw, &b_frame);
|
||||
ay = a_frame.y;
|
||||
by = b_frame.y;
|
||||
|
||||
@ -512,7 +512,7 @@ find_first_fit (MetaWindow *window,
|
||||
right_sorted = g_list_sort (right_sorted, topmost_cmp);
|
||||
right_sorted = g_list_sort (right_sorted, leftmost_cmp);
|
||||
|
||||
meta_window_get_outer_rect (window, &rect);
|
||||
meta_window_get_frame_rect (window, &rect);
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
{
|
||||
@ -545,12 +545,12 @@ find_first_fit (MetaWindow *window,
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle outer_rect;
|
||||
MetaRectangle frame_rect;
|
||||
|
||||
meta_window_get_outer_rect (w, &outer_rect);
|
||||
meta_window_get_frame_rect (w, &frame_rect);
|
||||
|
||||
rect.x = outer_rect.x;
|
||||
rect.y = outer_rect.y + outer_rect.height;
|
||||
rect.x = frame_rect.x;
|
||||
rect.y = frame_rect.y + frame_rect.height;
|
||||
|
||||
if (meta_rectangle_contains_rect (&work_area, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, below_sorted))
|
||||
@ -571,12 +571,12 @@ find_first_fit (MetaWindow *window,
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle outer_rect;
|
||||
MetaRectangle frame_rect;
|
||||
|
||||
meta_window_get_outer_rect (w, &outer_rect);
|
||||
meta_window_get_frame_rect (w, &frame_rect);
|
||||
|
||||
rect.x = outer_rect.x + outer_rect.width;
|
||||
rect.y = outer_rect.y;
|
||||
rect.x = frame_rect.x + frame_rect.width;
|
||||
rect.y = frame_rect.y;
|
||||
|
||||
if (meta_rectangle_contains_rect (&work_area, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, right_sorted))
|
||||
@ -718,8 +718,8 @@ meta_window_place (MetaWindow *window,
|
||||
{
|
||||
MetaRectangle frame_rect, parent_frame_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &frame_rect);
|
||||
meta_window_get_outer_rect (parent, &parent_frame_rect);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
meta_window_get_frame_rect (parent, &parent_frame_rect);
|
||||
|
||||
y = parent_frame_rect.y;
|
||||
|
||||
@ -754,7 +754,7 @@ meta_window_place (MetaWindow *window,
|
||||
int w, h;
|
||||
MetaRectangle frame_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &frame_rect);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
|
||||
/* Warning, this function is a round trip! */
|
||||
xi = meta_screen_get_current_monitor_info (window->screen);
|
||||
@ -820,17 +820,17 @@ meta_window_place (MetaWindow *window,
|
||||
!window->fullscreen)
|
||||
{
|
||||
MetaRectangle workarea;
|
||||
MetaRectangle outer;
|
||||
MetaRectangle frame_rect;
|
||||
|
||||
meta_window_get_work_area_for_monitor (window,
|
||||
xi->number,
|
||||
&workarea);
|
||||
meta_window_get_outer_rect (window, &outer);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
|
||||
/* If the window is bigger than the screen, then automaximize. Do NOT
|
||||
* auto-maximize the directions independently. See #419810.
|
||||
*/
|
||||
if (outer.width >= workarea.width && outer.height >= workarea.height)
|
||||
if (frame_rect.width >= workarea.width && frame_rect.height >= workarea.height)
|
||||
{
|
||||
window->maximize_horizontally_after_placement = TRUE;
|
||||
window->maximize_vertically_after_placement = TRUE;
|
||||
|
@ -1528,7 +1528,7 @@ meta_screen_tab_popup_create (MetaScreen *screen,
|
||||
if (show_type == META_TAB_SHOW_INSTANTLY ||
|
||||
!entries[i].hidden ||
|
||||
!meta_window_get_icon_geometry (window, &r))
|
||||
meta_window_get_outer_rect (window, &r);
|
||||
meta_window_get_frame_rect (window, &r);
|
||||
|
||||
entries[i].rect = r;
|
||||
|
||||
@ -1914,7 +1914,7 @@ meta_screen_get_monitor_for_window (MetaScreen *screen,
|
||||
{
|
||||
MetaRectangle window_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &window_rect);
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
|
||||
return meta_screen_get_monitor_for_rect (screen, &window_rect);
|
||||
}
|
||||
|
@ -1693,7 +1693,7 @@ window_contains_point (MetaWindow *window,
|
||||
{
|
||||
MetaRectangle rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &rect);
|
||||
meta_window_get_frame_rect (window, &rect);
|
||||
|
||||
return POINT_IN_RECT (root_x, root_y, rect);
|
||||
}
|
||||
|
@ -2931,8 +2931,8 @@ static gboolean
|
||||
windows_overlap (const MetaWindow *w1, const MetaWindow *w2)
|
||||
{
|
||||
MetaRectangle w1rect, w2rect;
|
||||
meta_window_get_outer_rect (w1, &w1rect);
|
||||
meta_window_get_outer_rect (w2, &w2rect);
|
||||
meta_window_get_frame_rect (w1, &w1rect);
|
||||
meta_window_get_frame_rect (w2, &w2rect);
|
||||
return meta_rectangle_overlap (&w1rect, &w2rect);
|
||||
}
|
||||
|
||||
@ -3733,11 +3733,11 @@ meta_window_maximize (MetaWindow *window,
|
||||
MetaRectangle old_rect;
|
||||
MetaRectangle new_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &old_rect);
|
||||
meta_window_get_frame_rect (window, &old_rect);
|
||||
|
||||
meta_window_move_resize_now (window);
|
||||
|
||||
meta_window_get_outer_rect (window, &new_rect);
|
||||
meta_window_get_frame_rect (window, &new_rect);
|
||||
meta_compositor_maximize_window (window->display->compositor,
|
||||
window,
|
||||
&old_rect,
|
||||
@ -3796,7 +3796,7 @@ meta_window_get_all_monitors (MetaWindow *window, gsize *length)
|
||||
int i;
|
||||
|
||||
monitors = g_array_new (FALSE, FALSE, sizeof (int));
|
||||
meta_window_get_outer_rect (window, &window_rect);
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
|
||||
for (i = 0; i < window->screen->n_monitor_infos; i++)
|
||||
{
|
||||
@ -3829,7 +3829,7 @@ meta_window_is_screen_sized (MetaWindow *window)
|
||||
int screen_width, screen_height;
|
||||
|
||||
meta_screen_get_size (window->screen, &screen_width, &screen_height);
|
||||
meta_window_get_outer_rect (window, &window_rect);
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
|
||||
if (window_rect.x == 0 && window_rect.y == 0 &&
|
||||
window_rect.width == screen_width && window_rect.height == screen_height)
|
||||
@ -3858,7 +3858,7 @@ meta_window_is_monitor_sized (MetaWindow *window)
|
||||
{
|
||||
MetaRectangle window_rect, monitor_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &window_rect);
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
meta_screen_get_monitor_geometry (window->screen, window->monitor->number, &monitor_rect);
|
||||
|
||||
if (meta_rectangle_equal (&window_rect, &monitor_rect))
|
||||
@ -3926,11 +3926,11 @@ meta_window_tile (MetaWindow *window)
|
||||
MetaRectangle old_rect;
|
||||
MetaRectangle new_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &old_rect);
|
||||
meta_window_get_frame_rect (window, &old_rect);
|
||||
|
||||
meta_window_move_resize_now (window);
|
||||
|
||||
meta_window_get_outer_rect (window, &new_rect);
|
||||
meta_window_get_frame_rect (window, &new_rect);
|
||||
meta_compositor_maximize_window (window->display->compositor,
|
||||
window,
|
||||
&old_rect,
|
||||
@ -4098,7 +4098,7 @@ meta_window_unmaximize_internal (MetaWindow *window,
|
||||
{
|
||||
MetaRectangle old_rect, new_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &old_rect);
|
||||
meta_window_get_frame_rect (window, &old_rect);
|
||||
|
||||
meta_window_move_resize_internal (window,
|
||||
META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION,
|
||||
@ -4108,7 +4108,7 @@ meta_window_unmaximize_internal (MetaWindow *window,
|
||||
target_rect.width,
|
||||
target_rect.height);
|
||||
|
||||
meta_window_get_outer_rect (window, &new_rect);
|
||||
meta_window_get_frame_rect (window, &new_rect);
|
||||
meta_compositor_unmaximize_window (window->display->compositor,
|
||||
window,
|
||||
&old_rect,
|
||||
@ -6129,16 +6129,17 @@ meta_window_frame_rect_to_client_rect (MetaWindow *window,
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_outer_rect:
|
||||
* meta_window_get_frame_rect:
|
||||
* @window: a #MetaWindow
|
||||
* @rect: (out): pointer to an allocated #MetaRectangle
|
||||
*
|
||||
* Gets the rectangle that bounds @window that is responsive to mouse events.
|
||||
* This includes only what is visible; it doesn't include any extra reactive
|
||||
* area we add to the edges of windows.
|
||||
* Gets the rectangle that bounds @window that is what the user thinks of
|
||||
* as the edge of the window. This doesn't include any extra reactive
|
||||
* area that we or the client adds to the window, or any area that the
|
||||
* client adds to draw a client-side shadow.
|
||||
*/
|
||||
void
|
||||
meta_window_get_outer_rect (const MetaWindow *window,
|
||||
meta_window_get_frame_rect (const MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
{
|
||||
if (window->frame)
|
||||
@ -6167,6 +6168,25 @@ meta_window_get_outer_rect (const MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_outer_rect:
|
||||
* @window: a #MetaWindow
|
||||
* @rect: (out): pointer to an allocated #MetaRectangle
|
||||
*
|
||||
* Gets the rectangle that bounds @window that is what the user thinks of
|
||||
* as the edge of the window. This doesn't include any extra reactive
|
||||
* area that we or the client adds to the window, or any area that the
|
||||
* client adds to draw a client-side shadow.
|
||||
*
|
||||
* Deprecated: 3.10: Use meta_window_get_frame_rect() instead.
|
||||
*/
|
||||
void
|
||||
meta_window_get_outer_rect (const MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
{
|
||||
meta_window_get_frame_rect (window, rect);
|
||||
}
|
||||
|
||||
const char*
|
||||
meta_window_get_startup_id (MetaWindow *window)
|
||||
{
|
||||
@ -9241,7 +9261,7 @@ meta_window_show_menu (MetaWindow *window,
|
||||
void
|
||||
meta_window_shove_titlebar_onscreen (MetaWindow *window)
|
||||
{
|
||||
MetaRectangle outer_rect;
|
||||
MetaRectangle frame_rect;
|
||||
GList *onscreen_region;
|
||||
int horiz_amount, vert_amount;
|
||||
int newx, newy;
|
||||
@ -9253,15 +9273,15 @@ meta_window_shove_titlebar_onscreen (MetaWindow *window)
|
||||
return;
|
||||
|
||||
/* Get the basic info we need */
|
||||
meta_window_get_outer_rect (window, &outer_rect);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
onscreen_region = window->screen->active_workspace->screen_region;
|
||||
|
||||
/* Extend the region (just in case the window is too big to fit on the
|
||||
* screen), then shove the window on screen, then return the region to
|
||||
* normal.
|
||||
*/
|
||||
horiz_amount = outer_rect.width;
|
||||
vert_amount = outer_rect.height;
|
||||
horiz_amount = frame_rect.width;
|
||||
vert_amount = frame_rect.height;
|
||||
meta_rectangle_expand_region (onscreen_region,
|
||||
horiz_amount,
|
||||
horiz_amount,
|
||||
@ -9269,15 +9289,15 @@ meta_window_shove_titlebar_onscreen (MetaWindow *window)
|
||||
vert_amount);
|
||||
meta_rectangle_shove_into_region(onscreen_region,
|
||||
FIXED_DIRECTION_X,
|
||||
&outer_rect);
|
||||
&frame_rect);
|
||||
meta_rectangle_expand_region (onscreen_region,
|
||||
-horiz_amount,
|
||||
-horiz_amount,
|
||||
0,
|
||||
-vert_amount);
|
||||
|
||||
newx = outer_rect.x + window->frame->child_x;
|
||||
newy = outer_rect.y + window->frame->child_y;
|
||||
newx = frame_rect.x + window->frame->child_x;
|
||||
newy = frame_rect.y + window->frame->child_y;
|
||||
meta_window_move_resize (window,
|
||||
FALSE,
|
||||
newx,
|
||||
@ -9302,7 +9322,7 @@ meta_window_titlebar_is_onscreen (MetaWindow *window)
|
||||
return FALSE;
|
||||
|
||||
/* Get the rectangle corresponding to the titlebar */
|
||||
meta_window_get_outer_rect (window, &titlebar_rect);
|
||||
meta_window_get_frame_rect (window, &titlebar_rect);
|
||||
titlebar_rect.height = window->frame->child_y;
|
||||
|
||||
/* Run through the spanning rectangles for the screen and see if one of
|
||||
@ -10532,7 +10552,7 @@ warp_grab_pointer (MetaWindow *window,
|
||||
/* We may not have done begin_grab_op yet, i.e. may not be in a grab
|
||||
*/
|
||||
|
||||
meta_window_get_outer_rect (window, &rect);
|
||||
meta_window_get_frame_rect (window, &rect);
|
||||
|
||||
switch (grab_op)
|
||||
{
|
||||
@ -10871,7 +10891,7 @@ meta_window_set_demands_attention (MetaWindow *window)
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_window_get_outer_rect (window, &candidate_rect);
|
||||
meta_window_get_frame_rect (window, &candidate_rect);
|
||||
|
||||
/* The stack is sorted with the top windows first. */
|
||||
|
||||
@ -10882,7 +10902,7 @@ meta_window_set_demands_attention (MetaWindow *window)
|
||||
|
||||
if (meta_window_located_on_workspace (other_window, window->workspace))
|
||||
{
|
||||
meta_window_get_outer_rect (other_window, &other_rect);
|
||||
meta_window_get_frame_rect (other_window, &other_rect);
|
||||
|
||||
if (meta_rectangle_overlap (&candidate_rect, &other_rect))
|
||||
{
|
||||
@ -11588,8 +11608,8 @@ meta_window_compute_tile_match (MetaWindow *window)
|
||||
bottommost = match;
|
||||
}
|
||||
|
||||
meta_window_get_outer_rect (bottommost, &bottommost_rect);
|
||||
meta_window_get_outer_rect (topmost, &topmost_rect);
|
||||
meta_window_get_frame_rect (bottommost, &bottommost_rect);
|
||||
meta_window_get_frame_rect (topmost, &topmost_rect);
|
||||
/*
|
||||
* If there's a window stacked in between which is partially visible
|
||||
* behind the topmost tile we don't consider the tiles to match.
|
||||
@ -11603,7 +11623,7 @@ meta_window_compute_tile_match (MetaWindow *window)
|
||||
meta_window_get_workspace (above) != meta_window_get_workspace (window))
|
||||
continue;
|
||||
|
||||
meta_window_get_outer_rect (above, &above_rect);
|
||||
meta_window_get_frame_rect (above, &above_rect);
|
||||
|
||||
if (meta_rectangle_overlap (&above_rect, &bottommost_rect) &&
|
||||
meta_rectangle_overlap (&above_rect, &topmost_rect))
|
||||
|
@ -110,7 +110,9 @@ gboolean meta_window_is_override_redirect (MetaWindow *window);
|
||||
gboolean meta_window_is_skip_taskbar (MetaWindow *window);
|
||||
MetaRectangle *meta_window_get_rect (MetaWindow *window);
|
||||
void meta_window_get_input_rect (const MetaWindow *window, MetaRectangle *rect);
|
||||
void meta_window_get_outer_rect (const MetaWindow *window, MetaRectangle *rect);
|
||||
|
||||
void meta_window_get_frame_rect (const MetaWindow *window, MetaRectangle *rect);
|
||||
void meta_window_get_outer_rect (const MetaWindow *window, MetaRectangle *rect) G_GNUC_DEPRECATED;
|
||||
|
||||
void meta_window_client_rect_to_frame_rect (MetaWindow *window,
|
||||
MetaRectangle *frame_rect,
|
||||
|
Loading…
Reference in New Issue
Block a user