diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-05-25 08:16:47 -0400 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-05-27 15:44:33 -0400 |
commit | 19d26dde92a9adc58bb1898740f3b844d1a83589 (patch) | |
tree | de3722f67e46e27c85e3bf86e92cb57ffc50cb92 /src/ui/frames.c | |
parent | 4acb9024234a7e564222c5c4280c8cb2695e3a76 (diff) | |
download | mutter-19d26dde92a9adc58bb1898740f3b844d1a83589.tar.gz |
core: Convert GET_FRAME_WIDTH / GET_FRAME_HEIGHT to GET_FRAME_RECT
Since we're going to be calling meta_window_get_frame_rect in here
soon, I'd rather it be one method call, rather than two. We can't
put it at the toplevel, since that might cause infinite recursion
(e.g. meta_core_get calls meta_window_get_frame_rect calls
meta_ui_get_frame_borders calls meta_core_get, ...)
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r-- | src/ui/frames.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c index 9de29f4d4..9066ef154 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -1601,21 +1601,20 @@ static void clip_region_to_visible_frame_border (cairo_region_t *region, MetaUIFrame *frame) { + MetaRectangle frame_rect; cairo_rectangle_int_t area; cairo_region_t *frame_border; MetaFrameFlags flags; MetaFrameType type; MetaFrameBorders borders; Display *display; - int frame_width, frame_height; display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); meta_core_get (display, frame->xwindow, META_CORE_GET_FRAME_FLAGS, &flags, META_CORE_GET_FRAME_TYPE, &type, - META_CORE_GET_FRAME_WIDTH, &frame_width, - META_CORE_GET_FRAME_HEIGHT, &frame_height, + META_CORE_GET_FRAME_RECT, &frame_rect, META_CORE_GET_END); meta_theme_get_frame_borders (meta_theme_get_current (), @@ -1625,8 +1624,8 @@ clip_region_to_visible_frame_border (cairo_region_t *region, /* Visible frame rect */ area.x = borders.invisible.left; area.y = borders.invisible.top; - area.width = frame_width - borders.invisible.left - borders.invisible.right; - area.height = frame_height - borders.invisible.top - borders.invisible.bottom; + area.width = frame_rect.width - borders.invisible.left - borders.invisible.right; + area.height = frame_rect.height - borders.invisible.top - borders.invisible.bottom; frame_border = cairo_region_create_rectangle (&area); |