Enlightenment CVS committal
Author : barbieri
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
ecore_x_window.c
Log Message:
Cleanup ecore_x_window_background_color_set().
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_window.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- ecore_x_window.c 5 Oct 2007 12:39:06 -0000 1.55
+++ ecore_x_window.c 10 Nov 2007 23:15:03 -0000 1.56
@@ -1123,24 +1123,26 @@
/**
* Sets the background color of the given window.
* @param win The given window
- * @param color The color to set to (i.e. 0xff0000)
+ * @param r red value (0...65536, 16 bits)
+ * @param g green value (0...65536, 16 bits)
+ * @param b blue value (0...65536, 16 bits)
*/
EAPI void
ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
unsigned short g, unsigned short b)
{
XSetWindowAttributes attr;
+ Colormap map;
XColor col;
col.red = r;
col.green = g;
col.blue = b;
-
- XAllocColor(_ecore_x_disp, DefaultColormap(_ecore_x_disp,
- DefaultScreen(_ecore_x_disp)),
- &col);
-
- attr.background_pixel = col.pixel;
+
+ map = DefaultColormap(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
+ XAllocColor(_ecore_x_disp, map, &col);
+
+ attr.background_pixel = col.pixel;
XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs