diff --git a/window.c b/window.c index b7b3618b4..3c5edbda3 100644 --- a/window.c +++ b/window.c @@ -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 diff --git a/window.h b/window.h index 373cd712d..2d6f3b378 100644 --- a/window.h +++ b/window.h @@ -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