diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-06-03 12:42:53 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-06-03 12:42:53 +0300 |
commit | 2f3c11ad389d6eff27de685993cc36df826e5f62 (patch) | |
tree | 663edd391e7fc87e847ecdf36b16ca3fb007ceed /libmetacity/meta-draw-op.c | |
parent | 320bb7f2f2b9143f871d2ee6061519a955b21ef6 (diff) | |
download | metacity-2f3c11ad389d6eff27de685993cc36df826e5f62.tar.gz |
libmetacity: don't use get_window_scale_factor in meta-draw-op.c
Require that all info here is always passed with correct values.
Diffstat (limited to 'libmetacity/meta-draw-op.c')
-rw-r--r-- | libmetacity/meta-draw-op.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libmetacity/meta-draw-op.c b/libmetacity/meta-draw-op.c index 03bd3057..fbdd7d64 100644 --- a/libmetacity/meta-draw-op.c +++ b/libmetacity/meta-draw-op.c @@ -59,22 +59,18 @@ fill_env (MetaPositionExprEnv *env, const MetaDrawInfo *info, GdkRectangle logical_region) { - int scale; - - scale = get_window_scaling_factor (); - /* FIXME this stuff could be raised into draw_op_list_draw() probably */ env->rect = logical_region; env->object_width = -1; env->object_height = -1; - env->left_width = info->borders.visible.left / scale; - env->right_width = info->borders.visible.right / scale; - env->top_height = info->borders.visible.top / scale; - env->bottom_height = info->borders.visible.bottom / scale; - env->frame_x_center = info->width / scale / 2 - logical_region.x; - env->frame_y_center = info->height / scale / 2 - logical_region.y; + env->left_width = info->left_width; + env->right_width = info->right_width; + env->top_height = info->top_height; + env->bottom_height = info->bottom_height; + 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; |