diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-10-03 21:38:00 +0300 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-10-05 21:50:13 +0300 |
| commit | d726c56c9576e4e16c098b018a4974fde501e8d8 (patch) | |
| tree | f211212f54a1b909cf6b75b14c384de17fee82a5 | |
| parent | 2d192ddbd3ad6970b95e6de1002c9257ad84bc3d (diff) | |
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
| -rw-r--r-- | monsterwm.c | 5 |
1 files 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); } /** |
