summaryrefslogtreecommitdiff
path: root/src/surface.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2021-11-17 01:15:13 +0000
committerPhil Jones <philj56@gmail.com>2021-11-17 01:15:13 +0000
commit7562d7b539d8013376de2cff494231ba307f4ee1 (patch)
tree1eb4e8b28ed10da0e7a582cc4a38cfc37cef3ff8 /src/surface.c
parent49c7405b6a88e56bb69e12189adb719927343e07 (diff)
Add sorting by run frequency.
This implements a rofi-like run cache. Other smaller changes include simplification of resize logic now that there's only one surface.
Diffstat (limited to 'src/surface.c')
-rw-r--r--src/surface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/surface.c b/src/surface.c
index cbc6c94..8052d5e 100644
--- a/src/surface.c
+++ b/src/surface.c
@@ -44,8 +44,8 @@ void surface_draw(
(double)surface->width / texture->width,
(double)surface->height / texture->height
);
- uint32_t width = (uint32_t)(scale * texture->width);
- uint32_t height = (uint32_t)(scale * texture->height);
+ int32_t width = (int32_t)(scale * texture->width);
+ int32_t height = (int32_t)(scale * texture->height);
int32_t x = -((int32_t)width - (int32_t)surface->width) / 2;
int32_t y = -((int32_t)height - (int32_t)surface->height) / 2;