summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-12 21:40:51 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-12 21:40:51 +0100
commita22e1174ee8b61bce400265206010cd52c5bace7 (patch)
treed9fc484b058d3b22cb2e22f5c70a63dccbcf44b7 /src/helpers
parent985764c8db01ff8f23461ed860eaacf3d52ee813 (diff)
screencopy: implement dmabuf
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/Monitor.cpp3
-rw-r--r--src/helpers/Monitor.hpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index e1cf54cd..cae76e8b 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -22,11 +22,13 @@ void CMonitor::onConnect(bool noRule) {
hyprListener_monitorStateRequest.removeCallback();
hyprListener_monitorDamage.removeCallback();
hyprListener_monitorNeedsFrame.removeCallback();
+ hyprListener_monitorCommit.removeCallback();
hyprListener_monitorFrame.initCallback(&output->events.frame, &Events::listener_monitorFrame, this);
hyprListener_monitorDestroy.initCallback(&output->events.destroy, &Events::listener_monitorDestroy, this);
hyprListener_monitorStateRequest.initCallback(&output->events.request_state, &Events::listener_monitorStateRequest, this);
hyprListener_monitorDamage.initCallback(&output->events.damage, &Events::listener_monitorDamage, this);
hyprListener_monitorNeedsFrame.initCallback(&output->events.needs_frame, &Events::listener_monitorNeedsFrame, this);
+ hyprListener_monitorCommit.initCallback(&output->events.commit, &Events::listener_monitorCommit, this);
if (m_bEnabled) {
wlr_output_enable(output, 1);
@@ -221,6 +223,7 @@ void CMonitor::onDisconnect() {
hyprListener_monitorFrame.removeCallback();
hyprListener_monitorDamage.removeCallback();
hyprListener_monitorNeedsFrame.removeCallback();
+ hyprListener_monitorCommit.removeCallback();
for (size_t i = 0; i < 4; ++i) {
for (auto& ls : m_aLayerSurfaceLayers[i]) {
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index bb475189..25753687 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -67,6 +67,7 @@ class CMonitor {
DYNLISTENER(monitorStateRequest);
DYNLISTENER(monitorDamage);
DYNLISTENER(monitorNeedsFrame);
+ DYNLISTENER(monitorCommit);
// hack: a group = workspaces on a monitor.
// I don't really care lol :P