From 26a5ff9f1f251cfe0fb728de9fd3cb427ff78ab1 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Fri, 21 Dec 2018 23:37:19 -0500 Subject: [PATCH] started implementing the redraw code --- src/pick.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pick.c b/src/pick.c index 5f5049b..51f2872 100644 --- a/src/pick.c +++ b/src/pick.c @@ -3,6 +3,8 @@ #include #include +#include "config.h" + typedef struct { float score; char* string; @@ -144,7 +146,10 @@ static void xresize(XConf* x, XEvent* e) { } static void redraw(XConf* x) { - x11_draw_rect(x, 0x00, 0, 0, x->width, x->height); + size_t fheight = x->font->height; + x11_draw_rect(x, Palette[EditBg], 0, 0, x->width, x->height); + x11_draw_rect(x, Palette[TagsBg], 0, 0, x->width, fheight + 4); + x11_draw_rect(x, Palette[HorBdr], 0, fheight + 4, x->width, 1); x11_flip(x); } @@ -157,6 +162,10 @@ static void filter(void) { | ButtonPressMask | ExposureMask ); + if (!(x.font = x11_font_load(&x, Fonts[0]))) { + perror("unable to load base font"); + exit(EXIT_FAILURE); + } x11_init_gc(&x); x11_centerwin(&x); x11_show(&x); -- 2.51.0