diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2018-03-19 00:16:25 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2018-03-19 00:16:25 +0100 |
| commit | 5a2fe9e2f226db509315c8e4290e9794a0ce0557 (patch) | |
| tree | 0db07881c59560d7bc7ba5a3f0b30ac16368c9d6 /src/main.cc | |
| parent | 66537685abb429be69ea2f82db6eca0c79e0f218 (diff) | |
Expand fake monitor to make testing removing machines easier
Diffstat (limited to 'src/main.cc')
| -rw-r--r-- | src/main.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 9285ccb..f7b3e58 100644 --- a/src/main.cc +++ b/src/main.cc @@ -239,6 +239,12 @@ public: io::write(pipe_, "q", 1); } +#if FAKE_MONITOR + void toggle_fakes() { + io::write(pipe_, " ", 1); + } +#endif + /* void quit_from_main(std::shared_ptr<x::Atoms> const& atoms) { // Wake up the event thread by sending an event to our window @@ -543,6 +549,12 @@ private: force_draw(); return; } +#if FAKE_MONITOR + if (tmp == ' ') { + monitor_->toggle_fakes(); + return; + } +#endif } } @@ -903,6 +915,13 @@ void xcb_event_loop(x::shared_connection const& conn, } break; } +#if FAKE_MONITOR + case ' ': + if (monmon->match(e->event)) { + monmon->toggle_fakes(); + } + break; +#endif } break; } |
