summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc19
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;
}