handle events on the right screen
This commit is contained in:
parent
6268e2c42a
commit
e8f387ea48
2 changed files with 2 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue