"Sever my leg"? "It's the greatest day"?
This commit is contained in:
parent
43369263d8
commit
30210c3ad8
1 changed files with 4 additions and 4 deletions
|
@ -270,10 +270,10 @@ int main(int argc, char **argv) {
|
||||||
screen = DefaultScreen(display);
|
screen = DefaultScreen(display);
|
||||||
|
|
||||||
win = XCreateSimpleWindow(display, DefaultRootWindow(display), 0, 0, width, height, 0, 0, 0);
|
win = XCreateSimpleWindow(display, DefaultRootWindow(display), 0, 0, width, height, 0, 0, 0);
|
||||||
buf = XdbeAllocateBackBufferName(display, win, XdbeUntouched);
|
buf = XdbeAllocateBackBufferName(display, win, XdbeBackground);
|
||||||
|
|
||||||
swapinfo.swap_window = win;
|
swapinfo.swap_window = win;
|
||||||
swapinfo.swap_action = XdbeUntouched;
|
swapinfo.swap_action = XdbeBackground;
|
||||||
|
|
||||||
gc = XCreateGC(display, win, GCForeground | GCBackground | GCGraphicsExposures, &values);
|
gc = XCreateGC(display, win, GCForeground | GCBackground | GCGraphicsExposures, &values);
|
||||||
bg = XCreatePixmap(display, win, width, height, 24);
|
bg = XCreatePixmap(display, win, width, height, 24);
|
||||||
|
@ -289,7 +289,7 @@ int main(int argc, char **argv) {
|
||||||
/*
|
/*
|
||||||
* Set up the foreground surface
|
* Set up the foreground surface
|
||||||
*/
|
*/
|
||||||
sfc = cairo_xlib_surface_create(display, win, DefaultVisual(display, screen), width, height);
|
sfc = cairo_xlib_surface_create(display, buf, DefaultVisual(display, screen), width, height);
|
||||||
cairo_xlib_surface_set_size(sfc, width, height);
|
cairo_xlib_surface_set_size(sfc, width, height);
|
||||||
|
|
||||||
cr = cairo_create(sfc);
|
cr = cairo_create(sfc);
|
||||||
|
@ -345,7 +345,7 @@ int main(int argc, char **argv) {
|
||||||
hexagram_can_if_read(can_if, &frame);
|
hexagram_can_if_read(can_if, &frame);
|
||||||
|
|
||||||
if (frame.can_id == 0x280) {
|
if (frame.can_id == 0x280) {
|
||||||
XCopyArea(display, bg, win, gc, 0, 0,
|
XCopyArea(display, bg, buf, gc, 0, 0,
|
||||||
width, height,
|
width, height,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue