mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
frames: We don't need to pass in the frame rect to get_bounds either
The MetaFrameGeometry already has this information.
This commit is contained in:
parent
4d3511649b
commit
dcce4e64bc
@ -379,7 +379,7 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
||||
cairo_region_t *
|
||||
meta_frame_get_frame_bounds (MetaFrame *frame)
|
||||
{
|
||||
return meta_ui_frame_get_bounds (frame->ui_frame, frame->rect.width, frame->rect.height);
|
||||
return meta_ui_frame_get_bounds (frame->ui_frame);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -620,21 +620,17 @@ get_client_rect (MetaFrameGeometry *fgeom,
|
||||
*/
|
||||
static void
|
||||
get_visible_frame_rect (MetaFrameGeometry *fgeom,
|
||||
int window_width,
|
||||
int window_height,
|
||||
cairo_rectangle_int_t *rect)
|
||||
{
|
||||
rect->x = fgeom->borders.invisible.left;
|
||||
rect->y = fgeom->borders.invisible.top;
|
||||
rect->width = window_width - fgeom->borders.invisible.right - rect->x;
|
||||
rect->height = window_height - fgeom->borders.invisible.bottom - rect->y;
|
||||
rect->width = fgeom->width - fgeom->borders.invisible.right - rect->x;
|
||||
rect->height = fgeom->height - fgeom->borders.invisible.bottom - rect->y;
|
||||
}
|
||||
|
||||
static cairo_region_t *
|
||||
get_visible_region (MetaUIFrame *frame,
|
||||
MetaFrameGeometry *fgeom,
|
||||
int window_width,
|
||||
int window_height)
|
||||
MetaFrameGeometry *fgeom)
|
||||
{
|
||||
cairo_region_t *corners_region;
|
||||
cairo_region_t *visible_region;
|
||||
@ -642,7 +638,7 @@ get_visible_region (MetaUIFrame *frame,
|
||||
cairo_rectangle_int_t frame_rect;
|
||||
|
||||
corners_region = cairo_region_create ();
|
||||
get_visible_frame_rect (fgeom, window_width, window_height, &frame_rect);
|
||||
get_visible_frame_rect (fgeom, &frame_rect);
|
||||
|
||||
if (fgeom->top_left_corner_rounded_radius != 0)
|
||||
{
|
||||
@ -724,13 +720,11 @@ get_visible_region (MetaUIFrame *frame,
|
||||
}
|
||||
|
||||
cairo_region_t *
|
||||
meta_ui_frame_get_bounds (MetaUIFrame *frame,
|
||||
int window_width,
|
||||
int window_height)
|
||||
meta_ui_frame_get_bounds (MetaUIFrame *frame)
|
||||
{
|
||||
MetaFrameGeometry fgeom;
|
||||
meta_ui_frame_calc_geometry (frame, &fgeom);
|
||||
return get_visible_region (frame, &fgeom, window_width, window_height);
|
||||
return get_visible_region (frame, &fgeom);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -135,9 +135,7 @@ void meta_ui_frame_repaint (MetaUIFrame *frame);
|
||||
void meta_ui_frame_get_borders (MetaUIFrame *frame,
|
||||
MetaFrameBorders *borders);
|
||||
|
||||
cairo_region_t * meta_ui_frame_get_bounds (MetaUIFrame *frame,
|
||||
int window_width,
|
||||
int window_height);
|
||||
cairo_region_t * meta_ui_frame_get_bounds (MetaUIFrame *frame);
|
||||
|
||||
void meta_ui_frame_get_mask (MetaUIFrame *frame,
|
||||
cairo_t *cr);
|
||||
|
Loading…
Reference in New Issue
Block a user