summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-01-29 01:25:57 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-01-29 01:25:57 +0200
commit50bb3d8ef169ab1ba39af4f1a007144132fb569c (patch)
tree2f423909ec72a0e5c9aedc5bb29658d7d8e5968f /src
parentde5f3fbd10d3e8b44a0be5723272c0d35bc7ff8b (diff)
downloadmetacity-50bb3d8ef169ab1ba39af4f1a007144132fb569c.tar.gz
theme: don't use MetaFrameGeometry in MetaDrawInfo
Diffstat (limited to 'src')
-rw-r--r--src/ui/theme-private.h5
-rw-r--r--src/ui/theme.c30
2 files changed, 15 insertions, 20 deletions
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index ebfc6e8a..8521f4a6 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -277,7 +277,10 @@ struct _MetaDrawInfo
PangoLayout *title_layout;
int title_layout_width;
int title_layout_height;
- const MetaFrameGeometry *fgeom;
+
+ MetaFrameBorders borders;
+ gint width;
+ gint height;
};
/**
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 10598cfa..bc2fc58f 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -1772,24 +1772,13 @@ fill_env (MetaPositionExprEnv *env,
env->rect = logical_region;
env->object_width = -1;
env->object_height = -1;
- if (info->fgeom)
- {
- env->left_width = info->fgeom->borders.visible.left;
- env->right_width = info->fgeom->borders.visible.right;
- env->top_height = info->fgeom->borders.visible.top;
- env->bottom_height = info->fgeom->borders.visible.bottom;
- env->frame_x_center = info->fgeom->width / 2 - logical_region.x;
- env->frame_y_center = info->fgeom->height / 2 - logical_region.y;
- }
- else
- {
- env->left_width = 0;
- env->right_width = 0;
- env->top_height = 0;
- env->bottom_height = 0;
- env->frame_x_center = 0;
- env->frame_y_center = 0;
- }
+
+ env->left_width = info->borders.visible.left;
+ env->right_width = info->borders.visible.right;
+ env->top_height = info->borders.visible.top;
+ env->bottom_height = info->borders.visible.bottom;
+ env->frame_x_center = info->width / 2 - logical_region.x;
+ env->frame_y_center = info->height / 2 - logical_region.y;
env->mini_icon_width = info->mini_icon ? gdk_pixbuf_get_width (info->mini_icon) : 0;
env->mini_icon_height = info->mini_icon ? gdk_pixbuf_get_height (info->mini_icon) : 0;
@@ -2946,7 +2935,10 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
draw_info.title_layout = title_layout;
draw_info.title_layout_width = title_layout ? extents.width : 0;
draw_info.title_layout_height = title_layout ? extents.height : 0;
- draw_info.fgeom = fgeom;
+
+ draw_info.borders = fgeom->borders;
+ draw_info.width = fgeom->width;
+ draw_info.height = fgeom->height;
/* The enum is in the order the pieces should be rendered. */
i = 0;