From 8b825188a070abef9767bc199868ae5bfc79068c Mon Sep 17 00:00:00 2001 From: Bart Massey Date: Sat, 8 Dec 2007 13:29:19 -0800 Subject: added aux_clear_window() for xlib compatibility, in spite of misgivings --- aux/xcb_aux.c | 10 ++++++++++ aux/xcb_aux.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/aux/xcb_aux.c b/aux/xcb_aux.c index f152669..3602afa 100644 --- a/aux/xcb_aux.c +++ b/aux/xcb_aux.c @@ -323,3 +323,13 @@ xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy, XCB_AUX_ADD_PARAM(&mask, &gv, join_style, joinstyle); return xcb_aux_change_gc_checked(dpy, gc, mask, &gv); } + +/* Adapted from Xlib */ +/* XXX It would be wiser for apps just to call + clear_area() directly. */ +xcb_void_cookie_t +xcb_aux_clear_window(xcb_connection_t * dpy, + xcb_window_t w) +{ + return xcb_clear_area(dpy, 0, w, 0, 0, 0, 0); +} diff --git a/aux/xcb_aux.h b/aux/xcb_aux.h index fce1f9e..952b0c3 100644 --- a/aux/xcb_aux.h +++ b/aux/xcb_aux.h @@ -188,6 +188,9 @@ xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy, int32_t capstyle, int32_t joinstyle); +xcb_void_cookie_t +xcb_aux_clear_window(xcb_connection_t * dpy, + xcb_window_t w); #ifdef __cplusplus } -- cgit v1.2.3