From 9a1e95b7da8aa4aa3b25cd373e76d3e90fc0e52f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 18 Nov 2015 08:36:08 -0500 Subject: Clean up memory pool files better --- swaybg/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'swaybg') diff --git a/swaybg/main.c b/swaybg/main.c index e8f400c0..790eb66b 100644 --- a/swaybg/main.c +++ b/swaybg/main.c @@ -17,11 +17,14 @@ int main(int argc, char **argv) { if (!(state = client_setup(100, 100))) { return -1; } + struct output_state *output = state->outputs->items[0]; + state->width = output->width; + state->height = output->height; uint8_t r = 100, g = 100, b = 100; do { - if (client_prerender(state)) { + if (client_prerender(state) && state->cairo) { cairo_set_source_rgb(state->cairo, r / 256.0, g / 256.0, b / 256.0); cairo_rectangle(state->cairo, 0, 0, state->width, state->height); cairo_fill(state->cairo); -- cgit v1.2.3