bugfix: initialize root variable earlier
This commit is contained in:
parent
7b01bc5eb7
commit
f395c141c8
|
@ -245,6 +245,10 @@ int main(int argc, char *argv[]) {
|
||||||
if (xcb_connection_has_error(conn))
|
if (xcb_connection_has_error(conn))
|
||||||
errx(EXIT_FAILURE, "Cannot open display\n");
|
errx(EXIT_FAILURE, "Cannot open display\n");
|
||||||
|
|
||||||
|
xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens);
|
||||||
|
root = root_screen->root;
|
||||||
|
root_depth = root_screen->root_depth;
|
||||||
|
|
||||||
load_configuration(conn, override_configpath, false);
|
load_configuration(conn, override_configpath, false);
|
||||||
if (only_check_config) {
|
if (only_check_config) {
|
||||||
LOG("Done checking configuration file. Exiting.\n");
|
LOG("Done checking configuration file. Exiting.\n");
|
||||||
|
@ -255,10 +259,6 @@ int main(int argc, char *argv[]) {
|
||||||
config.ipc_socket_path = getenv("I3SOCK");
|
config.ipc_socket_path = getenv("I3SOCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens);
|
|
||||||
root = root_screen->root;
|
|
||||||
root_depth = root_screen->root_depth;
|
|
||||||
|
|
||||||
uint32_t mask = XCB_CW_EVENT_MASK;
|
uint32_t mask = XCB_CW_EVENT_MASK;
|
||||||
uint32_t values[] = { XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
|
uint32_t values[] = { XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
|
||||||
XCB_EVENT_MASK_STRUCTURE_NOTIFY | /* when the user adds a screen (e.g. video
|
XCB_EVENT_MASK_STRUCTURE_NOTIFY | /* when the user adds a screen (e.g. video
|
||||||
|
|
Loading…
Reference in New Issue