]> Dogcows Code - chaz/openbox/commitdiff
handle events on the right screen
authorDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 08:38:51 +0000 (08:38 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 08:38:51 +0000 (08:38 +0000)
util/epist/epist.cc
util/epist/screen.cc

index a97b1f775e6b57672cf74ee92f740bc199748cd8..bfa7989ce89462588ef83cfa02fc6412480c1cd2 100644 (file)
@@ -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;
     }
index cf2c486f44a89e5a18b96f23c3b81be87b4f2cfa..ee19abb1cd1548d0ed209e0ccff99900b9cf78cc 100644 (file)
@@ -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:
This page took 0.024327 seconds and 4 git commands to generate.