fix sample XCB code formatting

This commit is contained in:
Vadim Lopatin 2014-03-13 18:33:55 +04:00
parent 77ee20c6a9
commit f3584dd6fc
1 changed files with 58 additions and 55 deletions

View File

@ -4,7 +4,8 @@ import std.stdio;
import std.c.linux.X11.xcb.xcb;
import std.c.linux.X11.xcb.xproto;
import std.c.stdlib;
int main()
int main(string[] args)
{
xcb_connection_t *c;
xcb_screen_t *s;
@ -22,6 +23,7 @@ int main()
writefln("Cannot open display");
return 1;
}
/* get the first screen */
s = xcb_setup_roots_iterator( xcb_get_setup(c) ).data;
@ -49,10 +51,11 @@ int main()
xcb_flush(c);
/* event loop */
do {
e = xcb_wait_for_event(c);
if(!e)break;
if (!e)
break;
switch (e.response_type & ~0x80) {
case XCB_EXPOSE: /* draw or redraw the window */
xcb_poly_fill_rectangle(c, w, g, 1, &r);