diff --git a/common/swindow.c b/common/swindow.c index 2444e881..60cf252a 100644 --- a/common/swindow.c +++ b/common/swindow.c @@ -87,6 +87,7 @@ simplewindow_delete(simple_window_t **sw) { xcb_destroy_window((*sw)->connection, (*sw)->window); xcb_free_pixmap((*sw)->connection, (*sw)->drawable); + xcb_free_gc((*sw)->connection, (*sw)->gc); p_delete(sw); } @@ -128,17 +129,4 @@ simplewindow_resize(simple_window_t *sw, unsigned int w, unsigned int h) resize_win_vals); } -/** Refresh the window content - * \param sw the simple_window_t to refresh - * \param phys_screen physical screen id - */ -void -simplewindow_refresh_drawable(simple_window_t *sw) -{ - xcb_copy_area(sw->connection, sw->drawable, - sw->window, sw->gc, 0, 0, 0, 0, - sw->geometry.width, - sw->geometry.height); -} - // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/common/swindow.h b/common/swindow.h index 9221b540..85570a50 100644 --- a/common/swindow.h +++ b/common/swindow.h @@ -39,7 +39,6 @@ simple_window_t * simplewindow_new(xcb_connection_t *, int, int, int, unsigned i void simplewindow_delete(simple_window_t **); void simplewindow_move(simple_window_t *, int, int); void simplewindow_resize(simple_window_t *, unsigned int, unsigned int); -void simplewindow_refresh_drawable(simple_window_t *); static inline void simplewindow_move_resize(simple_window_t *sw, int x, int y, @@ -49,5 +48,18 @@ simplewindow_move_resize(simple_window_t *sw, int x, int y, simplewindow_resize(sw, w, h); } +/** Refresh the window content + * \param sw the simple_window_t to refresh + * \param phys_screen physical screen id + */ +static inline void +simplewindow_refresh_drawable(simple_window_t *sw) +{ + xcb_copy_area(sw->connection, sw->drawable, + sw->window, sw->gc, 0, 0, 0, 0, + sw->geometry.width, + sw->geometry.height); +} + #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80