Bugfix: use the global root variable, don’t get the first one (Thanks quaec)

The case of an X11 server having multiple displays is handled correctly by the
code in src/mainx.c. However, due to some functions not being correctly
refactored and still getting the first screen (and also the first root window)
from the XCB connection, i3 was operating on the wrong root window.
This commit is contained in:
Michael Stapelberg
2010-09-09 15:34:13 +02:00
parent f6638b4b9e
commit f2896d34e0
5 changed files with 0 additions and 6 deletions

View File

@ -109,7 +109,6 @@ static int sig_handle_key_press(void *ignored, xcb_connection_t *conn, xcb_key_p
*
*/
static xcb_window_t open_input_window(xcb_connection_t *conn, Rect screen_rect, uint32_t width, uint32_t height) {
xcb_window_t root = xcb_setup_roots_iterator(xcb_get_setup(conn)).data->root;
xcb_window_t win = xcb_generate_id(conn);
uint32_t mask = 0;