diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/monitor.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/monitor.cc b/src/monitor.cc index 067a69a..60bccb2 100644 --- a/src/monitor.cc +++ b/src/monitor.cc @@ -302,6 +302,13 @@ class Ui : public Server::Delegate { update_lines(); draw(); break; + case Action::REFRESH: + for (auto& pair : sessions_) { + pair.second.state = State::IDLE; + } + update_lines(); + draw(); + break; } } @@ -324,6 +331,7 @@ class Ui : public Server::Delegate { RESIZE, NOTIFY, RESET, + REFRESH, }; struct Line { @@ -410,6 +418,10 @@ class Ui : public Server::Delegate { } if ((e->state & XCB_MOD_MASK_CONTROL) && str == "\x12" /* Ctrl + R */) { + post(Action::REFRESH); + } + if ((e->state & XCB_MOD_MASK_CONTROL) && + str == "\x04" /* Ctrl + D */) { post(Action::RESET); } } |
