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);
|
||||
XWindow *findWindow(Window window) const;
|
||||
|
||||
const ActionList actions(void) { return _actions; }
|
||||
const ActionList &actions(void) { return _actions; }
|
||||
};
|
||||
|
||||
#endif // __epist_hh
|
||||
|
|
|
@ -151,22 +151,27 @@ void screen::handleKeypress(const XEvent &e) {
|
|||
switch (it->type()) {
|
||||
case Action::nextWorkspace:
|
||||
cycleWorkspace(true);
|
||||
break;
|
||||
return;
|
||||
|
||||
case Action::prevWorkspace:
|
||||
cycleWorkspace(false);
|
||||
break;
|
||||
return;
|
||||
|
||||
case Action::changeWorkspace:
|
||||
changeWorkspace(it->number());
|
||||
break;
|
||||
|
||||
case Action::shade:
|
||||
(*_active)->shade(! (*_active)->shaded());
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
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