# HG changeset patch # User ib # Date 1359041650 0 # Node ID 5b5a3108e59fa1168b8f06065339e4c1ba77e041 # Parent 9c74edcbbc962ad50788b456cf2f51e142c0c7d8 Partly revert r35847. There were non-cosmetic changes that weren't suppose to be in that commit. Revert them. diff -r 9c74edcbbc96 -r 5b5a3108e59f gui/wm/ws.c --- a/gui/wm/ws.c Thu Jan 24 15:27:26 2013 +0000 +++ b/gui/wm/ws.c Thu Jan 24 15:34:10 2013 +0000 @@ -1019,6 +1019,9 @@ } } +// ---------------------------------------------------------------------------------------------- +// Set window background to 'color'. +// ---------------------------------------------------------------------------------------------- /** * @brief Pack color components @a r, @a g and @a b into 15 bits. * @@ -1063,16 +1066,6 @@ return pixel; } -/** - * @brief Set and fill, or unset a window background. - * - * @param win pointer to a ws window structure - * @param r red (0 - 255, or -1) - * @param g green (0 - 255, or -1) - * @param b blue (0 - 255, or -1) - * - * @note Passing -1 for @a r, @a g and @a b unsets the background. - */ void wsWindowBackground(wsWindow *win, int r, int g, int b) { int color = 0; @@ -1108,12 +1101,8 @@ ; } - if (r == -1 && g == -1 && b == -1) - XSetWindowBackgroundPixmap(wsDisplay, win->WindowID, None); - else { - XSetWindowBackground(wsDisplay, win->WindowID, color); - XClearWindow(wsDisplay, win->WindowID); - } + XSetWindowBackground(wsDisplay, win->WindowID, color); + XClearWindow(wsDisplay, win->WindowID); } // ----------------------------------------------------------------------------------------------