Initially give focus to the root window

See http://lists.suckless.org/dev/1308/17428.html.
This commit is contained in:
Bastien Dejean 2013-08-30 23:37:53 +02:00
parent d454596484
commit 8448fe0759

View file

@ -240,6 +240,10 @@ void setup(void)
ewmh_update_desktop_names();
ewmh_update_current_desktop();
frozen_pointer = make_pointer_state();
xcb_get_input_focus_reply_t *ifo = xcb_get_input_focus_reply(dpy, xcb_get_input_focus(dpy), NULL);
if (ifo != NULL && (ifo->focus == XCB_INPUT_FOCUS_POINTER_ROOT || ifo->focus == XCB_NONE))
clear_input_focus();
free(ifo);
}
void register_events(void)