From d726c56c9576e4e16c098b018a4974fde501e8d8 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Wed, 3 Oct 2012 21:38:00 +0300 Subject: bugfix: fix focusin function not giving focus to the correct window thanks to @djura-san for the report ref: https://bbs.archlinux.org/viewtopic.php?pid=1165368#p1165368 --- monsterwm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monsterwm.c b/monsterwm.c index a080942..d42dd9c 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -551,9 +551,8 @@ void focus(Client *c, Desktop *d) { * client, by the user, through the wm. */ void focusin(XEvent *e) { - Desktop *d = NULL; Client *c = NULL; - if (wintoclient(e->xfocus.window, &c, &d) && d->curr && - e->xfocus.window != d->curr->win) focus(d->curr, d); + Desktop *d = &desktops[currdeskidx]; + if (d->curr && d->curr->win != e->xfocus.window) focus(d->curr, d); } /** -- cgit v1.3.1