summaryrefslogtreecommitdiff
path: root/src/events
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-19 16:28:04 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-19 16:28:04 +0000
commitdf132e5ff3395a15c1b48461cc588e4222ae1e02 (patch)
tree93c701bf79af1c8033f105f6db40926aab1272de /src/events
parent0ffaa8d6673c02e9360865c8cde69a606c036af7 (diff)
update wlroots dep
Diffstat (limited to 'src/events')
-rw-r--r--src/events/Events.hpp1
-rw-r--r--src/events/Monitors.cpp7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/events/Events.hpp b/src/events/Events.hpp
index 4b6d8f76..e3088110 100644
--- a/src/events/Events.hpp
+++ b/src/events/Events.hpp
@@ -96,6 +96,7 @@ namespace Events {
// Monitor part 2 the sequel
DYNLISTENFUNC(monitorFrame);
DYNLISTENFUNC(monitorDestroy);
+ DYNLISTENFUNC(monitorStateRequest);
// XWayland
LISTENER(readyXWayland);
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp
index 1924fe22..4414187a 100644
--- a/src/events/Monitors.cpp
+++ b/src/events/Monitors.cpp
@@ -354,3 +354,10 @@ void Events::listener_monitorDestroy(void* owner, void* data) {
}
}
}
+
+void Events::listener_monitorStateRequest(void* owner, void* data) {
+ const auto PMONITOR = (CMonitor*)owner;
+ const auto E = (wlr_output_event_request_state*)data;
+
+ wlr_output_commit_state(PMONITOR->output, E->state);
+}