aboutsummaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/draw.c b/draw.c
index afd727e..440231b 100644
--- a/draw.c
+++ b/draw.c
@@ -3,7 +3,7 @@
#include <pango/pango-font.h>
#include <pango/pango-types.h>
-#include "x11.h"
+#include "draw.h"
#include "log.h"
// Make this a state passed to draw
@@ -28,7 +28,8 @@ void draw(Window *win)
int screen_width, screen_height;
window_get_screen_size(win, &screen_width, &screen_height);
- int width = round((screen_width - 2 * draw_x_padding) * scale);
+ int width0 = screen_width - 2 * draw_x_padding;
+ int width = round(width0 * scale);
int height = round(draw_height * scale);
cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
@@ -98,7 +99,7 @@ void draw(Window *win)
// TODO: Move these somewhere else
window_move(win, x, y);
- window_resize(win, width, height);
+ window_resize(win, width0, draw_height);
window_paint_surface(win, surface, width, height);
cairo_surface_destroy(surface);