[mutter] frames: We don't need to pass in the frame rect to get_bounds either
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] frames: We don't need to pass in the frame rect to get_bounds either
- Date: Thu, 1 Jan 2015 20:03:25 +0000 (UTC)
commit dcce4e64bcf041f976ce0aa65f6ce5986186bcc4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jan 1 10:33:27 2015 -0800
frames: We don't need to pass in the frame rect to get_bounds either
The MetaFrameGeometry already has this information.
src/core/frame.c | 2 +-
src/ui/frames.c | 18 ++++++------------
src/ui/frames.h | 4 +---
3 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 23bb6e1..bf75265 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 83378c3..3070120 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 139cb36..3f17ca4 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]