diff options
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r-- | src/ui/frames.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c index 8fcdd9fa..3cd7b81c 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -2368,7 +2368,6 @@ populate_cache (MetaFrames *frames, MetaFrameBorders borders; int width, height; int frame_width, frame_height, screen_width, screen_height; - gint scale; CachedPixels *pixels; MetaFrameType frame_type; MetaFrameFlags frame_flags; @@ -2399,7 +2398,6 @@ populate_cache (MetaFrames *frames, &borders); pixels = get_cache (frames, frame); - scale = gdk_window_get_scale_factor (frame->window); /* Setup the rectangles for the four visible frame borders. First top, then * left, right and bottom. Top and bottom extend to the invisible borders @@ -2413,28 +2411,28 @@ populate_cache (MetaFrames *frames, * size without any border added. */ /* top */ - pixels->piece[0].rect.x = borders.invisible.left / scale; - pixels->piece[0].rect.y = borders.invisible.top / scale; - pixels->piece[0].rect.width = (width + borders.visible.left + borders.visible.right) * scale; - pixels->piece[0].rect.height = borders.visible.top * scale; + pixels->piece[0].rect.x = borders.invisible.left; + pixels->piece[0].rect.y = borders.invisible.top; + pixels->piece[0].rect.width = width + borders.visible.left + borders.visible.right; + pixels->piece[0].rect.height = borders.visible.top; /* left */ - pixels->piece[1].rect.x = borders.invisible.left / scale; - pixels->piece[1].rect.y = borders.total.top / scale; - pixels->piece[1].rect.width = borders.visible.left * scale; - pixels->piece[1].rect.height = height * scale; + pixels->piece[1].rect.x = borders.invisible.left; + pixels->piece[1].rect.y = borders.total.top; + pixels->piece[1].rect.width = borders.visible.left; + pixels->piece[1].rect.height = height; /* right */ - pixels->piece[2].rect.x = (borders.total.left + width) / scale; - pixels->piece[2].rect.y = borders.total.top / scale; - pixels->piece[2].rect.width = borders.visible.right * scale; - pixels->piece[2].rect.height = height * scale; + pixels->piece[2].rect.x = borders.total.left + width; + pixels->piece[2].rect.y = borders.total.top; + pixels->piece[2].rect.width = borders.visible.right; + pixels->piece[2].rect.height = height; /* bottom */ - pixels->piece[3].rect.x = borders.invisible.left / scale; - pixels->piece[3].rect.y = (borders.total.top + height) / scale; - pixels->piece[3].rect.width = (width + borders.visible.left + borders.visible.right) * scale; - pixels->piece[3].rect.height = borders.visible.bottom * scale; + pixels->piece[3].rect.x = borders.invisible.left; + pixels->piece[3].rect.y = borders.total.top + height; + pixels->piece[3].rect.width = width + borders.visible.left + borders.visible.right; + pixels->piece[3].rect.height = borders.visible.bottom; for (i = 0; i < 4; i++) { |