Optimization: Get the colorpixels when loading configuration, make use of the new config struct

Instead of building arrays of colorpixels we can simply use a pointer
to a struct Colortriple. Furthermore, by getting the colorpixels when
loading the configuration, we save a lot of function calls in the
main code.
This commit is contained in:
Michael Stapelberg
2009-06-01 15:14:45 +02:00
parent 1fcad44f66
commit 2a67630aa6
5 changed files with 53 additions and 70 deletions

View File

@ -112,10 +112,10 @@ int main(int argc, char *argv[], char *env[]) {
memset(&evenths, 0, sizeof(xcb_event_handlers_t));
memset(&prophs, 0, sizeof(xcb_property_handlers_t));
load_configuration(override_configpath);
conn = xcb_connect(NULL, &screens);
load_configuration(conn, override_configpath);
/* Place requests for the atoms we need as soon as possible */
#define REQUEST_ATOM(name) atom_cookies[name] = xcb_intern_atom(conn, 0, strlen(#name), #name);