[mutter] frames: Don't pass the frame rect into get_mask
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] frames: Don't pass the frame rect into get_mask
- Date: Thu, 1 Jan 2015 20:03:20 +0000 (UTC)
commit 4d3511649b330adeff8ad89fd12b2d5d7b887ffe
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jan 1 11:06:47 2015 -0800
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 529a7c6..23bb6e1 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 347dcd0..83378c3 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 66c72a0..139cb36 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]