It seems like we did not ensure that the root window has the input focus
when starting dwm without any clients. This led to several problems,
such as dwm being unresponsive when started from LXDM, see
https://bbs.archlinux.org/viewtopic.php?id=147693 for details.

Fix this by setting the initial input focus in setup().

Signed-off-by: Lukas Fleischer <suckl...@cryptocrack.de>
---
I am not entirely sure whether this is the right thing to do but it
fixes the problems mentioned in the commit message for me.

 dwm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dwm.c b/dwm.c
index 6f716e9..1bbb4b3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1542,6 +1542,7 @@ setup(void) {
        XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
        XSelectInput(dpy, root, wa.event_mask);
        grabkeys();
+       focus(NULL);
 }
 
 void
-- 
1.8.4.rc2.477.g1da3ebd


Reply via email to