]> Dogcows Code - chaz/openbox/blobdiff - util/epist/screen.cc
call the window's processEvent() directly instead of the screen's, since it didn...
[chaz/openbox] / util / epist / screen.cc
index 5e56fc91e750ad4dccb75ea897b30c15dd8a8952..0220a9499ef7ec34676d77784686b9a89e5730d0 100644 (file)
@@ -149,7 +149,9 @@ void screen::processEvent(const XEvent &e) {
                                  DestroyNotify, &ev) ||
           XCheckTypedWindowEvent(_epist->getXDisplay(), e.xany.window,
                                  UnmapNotify, &ev)) {
-        processEvent(ev);
+
+        XWindow *win = _epist->findWindow(e.xany.window);
+        if (win) win->processEvent(ev);
       }
 
       updateClientList();
@@ -515,7 +517,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
This page took 0.021661 seconds and 4 git commands to generate.