diff --git a/src/core/frame.c b/src/core/frame.c index 23bb6e106..bf7526584 100644 --- a/src/core/frame.c +++ b/src/core/frame.c @@ -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 diff --git a/src/ui/frames.c b/src/ui/frames.c index 83378c3fc..30701206d 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -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 diff --git a/src/ui/frames.h b/src/ui/frames.h index 139cb36e3..3f17ca419 100644 --- a/src/ui/frames.h +++ b/src/ui/frames.h @@ -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);