make the returned action list a const reference
This commit is contained in:
parent
8ec56b9907
commit
b790e78e0a
2 changed files with 14 additions and 9 deletions
|
@ -67,7 +67,7 @@ public:
|
||||||
void removeWindow(XWindow *window);
|
void removeWindow(XWindow *window);
|
||||||
XWindow *findWindow(Window window) const;
|
XWindow *findWindow(Window window) const;
|
||||||
|
|
||||||
const ActionList actions(void) { return _actions; }
|
const ActionList &actions(void) { return _actions; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __epist_hh
|
#endif // __epist_hh
|
||||||
|
|
|
@ -151,22 +151,27 @@ void screen::handleKeypress(const XEvent &e) {
|
||||||
switch (it->type()) {
|
switch (it->type()) {
|
||||||
case Action::nextWorkspace:
|
case Action::nextWorkspace:
|
||||||
cycleWorkspace(true);
|
cycleWorkspace(true);
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case Action::prevWorkspace:
|
case Action::prevWorkspace:
|
||||||
cycleWorkspace(false);
|
cycleWorkspace(false);
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case Action::changeWorkspace:
|
case Action::changeWorkspace:
|
||||||
changeWorkspace(it->number());
|
changeWorkspace(it->number());
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case Action::shade:
|
|
||||||
(*_active)->shade(! (*_active)->shaded());
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
// these actions require an active window
|
||||||
|
if (_active != _clients.end()) {
|
||||||
|
XWindow *window = *_active;
|
||||||
|
|
||||||
|
switch (it->type()) {
|
||||||
|
case Action::shade:
|
||||||
|
window->shade(! window->shaded());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue