From 4d3511649b330adeff8ad89fd12b2d5d7b887ffe Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 1 Jan 2015 11:06:47 -0800 Subject: [PATCH] frames: Don't pass the frame rect into get_mask We can query it directly. --- src/core/frame.c | 2 +- src/ui/frames.c | 9 +++------ src/ui/frames.h | 2 -- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/core/frame.c b/src/core/frame.c index 529a7c655..23bb6e106 100644 --- a/src/core/frame.c +++ b/src/core/frame.c @@ -386,7 +386,7 @@ void meta_frame_get_mask (MetaFrame *frame, cairo_t *cr) { - meta_ui_frame_get_mask (frame->ui_frame, frame->rect.width, frame->rect.height, cr); + meta_ui_frame_get_mask (frame->ui_frame, cr); } void diff --git a/src/ui/frames.c b/src/ui/frames.c index 347dcd03e..83378c3fc 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -1487,30 +1487,27 @@ get_visible_frame_border_region (MetaUIFrame *frame) * * @frame: This frame * @xwindow: The X window for the frame, which has the client window as a child - * @width: The width of the framed window including any invisible borders - * @height: The height of the framed window including any invisible borders * @cr: Used to draw the resulting mask */ void meta_ui_frame_get_mask (MetaUIFrame *frame, - guint width, - guint height, cairo_t *cr) { MetaFrameBorders borders; MetaFrameFlags flags; + MetaRectangle frame_rect; meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow, META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_FRAME_RECT, &frame_rect, META_CORE_GET_END); meta_style_info_set_flags (frame->style_info, flags); meta_ui_frame_get_borders (frame, &borders); gtk_render_background (frame->style_info->styles[META_STYLE_ELEMENT_FRAME], cr, borders.invisible.left, borders.invisible.top, - width - borders.invisible.left - borders.invisible.right, - height - borders.invisible.top - borders.invisible.bottom); + frame_rect.width, frame_rect.height); } /* XXX -- this is disgusting. Find a better approach here. diff --git a/src/ui/frames.h b/src/ui/frames.h index 66c72a01e..139cb36e3 100644 --- a/src/ui/frames.h +++ b/src/ui/frames.h @@ -140,8 +140,6 @@ cairo_region_t * meta_ui_frame_get_bounds (MetaUIFrame *frame, int window_height); void meta_ui_frame_get_mask (MetaUIFrame *frame, - guint width, - guint height, cairo_t *cr); void meta_ui_frame_move_resize (MetaUIFrame *frame,