add function to copy drawable to window

This commit is contained in:
Julien Danjou 2008-01-23 19:51:16 +01:00
parent e0a12f9e58
commit 0e4568b305
2 changed files with 12 additions and 0 deletions

View file

@ -240,4 +240,15 @@ simplewindow_move(SimpleWindow *sw, int x, int y)
return XMoveWindow(globalconf.display, sw->window, x, y);
}
int
simplewindow_refresh_drawable(SimpleWindow *sw, int phys_screen)
{
return XCopyArea(globalconf.display, sw->drawable,
sw->window,
DefaultGC(globalconf.display, phys_screen), 0, 0,
sw->geometry.width,
sw->geometry.height,
0, 0);
}
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

View file

@ -33,6 +33,7 @@ int window_settrans(Window, double);
SimpleWindow * simplewindow_new(int, int, int, unsigned int, unsigned int, unsigned int, Bool);
void simplewindow_delete(SimpleWindow *);
int simplewindow_move(SimpleWindow *, int, int);
int simplewindow_refresh_drawable(SimpleWindow *, int);
#endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80