diff options
Diffstat (limited to 'src/events')
| -rw-r--r-- | src/events/Events.hpp | 1 | ||||
| -rw-r--r-- | src/events/Monitors.cpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/events/Events.hpp b/src/events/Events.hpp index ae441fbb..26db2b22 100644 --- a/src/events/Events.hpp +++ b/src/events/Events.hpp @@ -98,6 +98,7 @@ namespace Events { DYNLISTENFUNC(monitorFrame); DYNLISTENFUNC(monitorDestroy); DYNLISTENFUNC(monitorStateRequest); + DYNLISTENFUNC(monitorDamage); // XWayland LISTENER(readyXWayland); diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index ccdb3ef0..4749ff22 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -196,3 +196,10 @@ void Events::listener_monitorStateRequest(void* owner, void* data) { wlr_output_commit_state(PMONITOR->output, E->state); } + +void Events::listener_monitorDamage(void* owner, void* data) { + const auto PMONITOR = (CMonitor*)owner; + const auto E = (wlr_output_event_damage*)data; + + PMONITOR->addDamage(E->damage); +} |
