From e8f387ea481470dd69257f0e7d4644ab1270b64a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 22 Jul 2002 08:38:51 +0000 Subject: [PATCH] handle events on the right screen --- util/epist/epist.cc | 9 +-------- util/epist/screen.cc | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/util/epist/epist.cc b/util/epist/epist.cc index a97b1f77..bfa7989c 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -253,16 +253,9 @@ bool epist::handleSignal(int sig) { void epist::process_event(XEvent *e) { - Window root; - - if (e->xany.type == KeyPress) - root = e->xkey.root; - else - root = e->xany.window; - ScreenList::const_iterator it, end = _screens.end(); for (it = _screens.begin(); it != end; ++it) { - if ((*it)->rootWindow() == root) { + if ((*it)->rootWindow() == e->xany.window) { (*it)->processEvent(*e); return; } diff --git a/util/epist/screen.cc b/util/epist/screen.cc index cf2c486f..ee19abb1 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -118,6 +118,7 @@ XWindow *screen::findWindow(const XEvent &e) const { void screen::processEvent(const XEvent &e) { assert(_managed); + assert(e.xany.window == _root); switch (e.type) { case PropertyNotify: -- 2.45.2