summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-07-22 08:38:51 +0000
committerDana Jansens <danakj@orodu.net>2002-07-22 08:38:51 +0000
commite8f387ea481470dd69257f0e7d4644ab1270b64a (patch)
treec2ecdcb2935f5e54a7520d0b58b906fc3bcb93c5
parent6268e2c42adc2bca464867b5a9a2e79085e9a425 (diff)
handle events on the right screen
-rw-r--r--util/epist/epist.cc9
-rw-r--r--util/epist/screen.cc1
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: