aboutsummaryrefslogtreecommitdiff
path: root/swt.c
diff options
context:
space:
mode:
Diffstat (limited to 'swt.c')
-rw-r--r--swt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/swt.c b/swt.c
index 446267a..b16447d 100644
--- a/swt.c
+++ b/swt.c
@@ -72,7 +72,7 @@ static int execshortcut();
static char *kmap();
static void buffer_release(void *data, struct wl_buffer *buffer);
static void draw_frame();
-static uint32_t get_color(int i);
+static uint32_t get_color(uint32_t i);
static void draw_glyph(Glyph g, int x, int y);
static void commit_surface();
static void surface_configure(void *data, struct xdg_surface *surface, uint32_t serial);
@@ -216,10 +216,11 @@ paste()
uint32_t
-get_color(int i)
+get_color(uint32_t i)
{
- if (!BETWEEN(i, 0, sizeof(colors) / sizeof(uint32_t)))
- return colors[defaultbg];
+ if (!BETWEEN(i, 0, sizeof(colors) / sizeof(uint32_t))) {
+ return i;
+ }
return colors[i];
}