diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-18 08:36:08 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-18 08:36:08 -0500 |
commit | 9a1e95b7da8aa4aa3b25cd373e76d3e90fc0e52f (patch) | |
tree | 00b8c41be09152db23d8f46499f70421695bccf6 /swaybg/main.c | |
parent | 49388eb88b1004005e8f2efff2b6e46f9ca2f88a (diff) |
Clean up memory pool files better
Diffstat (limited to 'swaybg/main.c')
-rw-r--r-- | swaybg/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |