mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Further refinement of wayland client support
This commit is contained in:
parent
bfcabe48ef
commit
11b1ba397f
3 changed files with 50 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue