summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/epist/screen.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/epist/screen.cc b/util/epist/screen.cc
index 5e56fc91..1705202b 100644
--- a/util/epist/screen.cc
+++ b/util/epist/screen.cc
@@ -515,7 +515,9 @@ const XWindow *screen::lastActiveWindow() const {
WindowList::const_iterator it, end = _clients.end();
for (it = _clients.begin(); it != end; ++it)
if ((*it)->getScreen() == this && ! (*it)->iconic() &&
- ((*it)->desktop() == 0xffffffff || (*it)->desktop() == _active_desktop))
+ (*it)->canFocus() &&
+ ((*it)->desktop() == 0xffffffff ||
+ (*it)->desktop() == _active_desktop))
return *it;
// no windows on this screen