diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-12 19:35:39 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-12 19:35:39 -0500 |
commit | 11b1ba397f9bef1266f073fafab3e8de51346032 (patch) | |
tree | 7f9a3f548cc3cd521ade3f777e5b812135bac053 /swaybg | |
parent | bfcabe48ef3fc7a0388de007504fc232f826fb84 (diff) |
Further refinement of wayland client support
Diffstat (limited to 'swaybg')
-rw-r--r-- | swaybg/main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/swaybg/main.c b/swaybg/main.c index 1b4af550..5ceb94bc 100644 --- a/swaybg/main.c +++ b/swaybg/main.c @@ -15,12 +15,22 @@ int main(int argc, char **argv) { init_log(L_INFO); state = client_setup(); + uint8_t r = 0, g = 0, b = 0; + + int rs; do { if (!client_prerender(state)) continue; - cairo_set_source_rgb(state->cairo, 255, 0, 0); + cairo_set_source_rgb(state->cairo, r, g, b); cairo_rectangle(state->cairo, 0, 0, 100, 100); cairo_fill(state->cairo); - } while (client_render(state)); + + rs = client_render(state); + + if (rs == 1) { + sway_log(L_INFO, "rendering %d %d %d", r, g, b); + r++; g++; b++; + } + } while (rs); client_teardown(state); return 0; |