# HG changeset patch # User ib # Date 1357851157 0 # Node ID 2e7f2ecaaf0b326ca6f7564bc44e60f081cf22d7 # Parent 78d9cfd68b342da1e940eea66b193d3af0a6eff3 Don't define a function by a macro. Use a proper function definition. diff -r 78d9cfd68b34 -r 2e7f2ecaaf0b gui/wm/ws.c --- a/gui/wm/ws.c Thu Jan 10 19:23:37 2013 +0000 +++ b/gui/wm/ws.c Thu Jan 10 20:52:37 2013 +0000 @@ -1536,6 +1536,16 @@ return 0; } +/** + * @brief Clear the entire area in a window. + * + * @param win pointer to a ws window structure + */ +void wsClearWindow(wsTWindow *win) +{ + XClearWindow(wsDisplay, win->WindowID); +} + void wsSetTitle(wsTWindow *win, char *name) { XStoreName(wsDisplay, win->WindowID, name); diff -r 78d9cfd68b34 -r 2e7f2ecaaf0b gui/wm/ws.h --- a/gui/wm/ws.h Thu Jan 10 19:23:37 2013 +0000 +++ b/gui/wm/ws.h Thu Jan 10 20:52:37 2013 +0000 @@ -242,7 +242,7 @@ void wsSetBackground(wsTWindow *win, int color); void wsSetForegroundRGB(wsTWindow *win, int r, int g, int b); void wsSetBackgroundRGB(wsTWindow *win, int r, int g, int b); -#define wsClearWindow(win) XClearWindow(wsDisplay, (win)->WindowID) +void wsClearWindow(wsTWindow *win); void wsSetTitle(wsTWindow *win, char *name); void wsVisibleWindow(wsTWindow *win, int show); void wsWindowDecoration(wsTWindow *win, Bool decor);