diff --git a/util/epist/window.cc b/util/epist/window.cc index 5d1690f0..6b3f2f5f 100644 --- a/util/epist/window.cc +++ b/util/epist/window.cc @@ -130,12 +130,13 @@ void XWindow::updateNormalHints() { void XWindow::updateWMHints() { XWMHints *hints; + // assume a window takes input if it doesnt specify + _can_focus = True; + if ((hints = XGetWMHints(_epist->getXDisplay(), _window)) != NULL) { - _can_focus = hints->input; + if (hints->flags & InputHint) + _can_focus = hints->input; XFree(hints); - } else { - // assume a window takes input if it doesnt specify - _can_focus = True; } }