diff options
author | Vaxry <[email protected]> | 2024-10-08 16:59:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-08 16:59:15 +0100 |
commit | 1bf63dfdcd76c09137b4647f9af2c5ebc9fc6e34 (patch) | |
tree | e423ee76ef6d27a1178349d3c45737ad4191808d /src/helpers | |
parent | e0cfbec66b97edb2957508152f32e77a1b181afc (diff) | |
download | Hyprland-1bf63dfdcd76c09137b4647f9af2c5ebc9fc6e34.tar.gz Hyprland-1bf63dfdcd76c09137b4647f9af2c5ebc9fc6e34.zip |
protocols: Add support for hyprland-ctm-control-v1 (#8023)
* initial ctm support
* flake.lock: update
* Meson: bump required versions and add ctm proto
---------
Co-authored-by: Mihai Fufezan <[email protected]>
Diffstat (limited to 'src/helpers')
-rw-r--r-- | src/helpers/Monitor.cpp | 6 | ||||
-rw-r--r-- | src/helpers/Monitor.hpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index c6cef41f..f3e7de4e 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -813,6 +813,12 @@ void CMonitor::scheduleDone() { }); } +void CMonitor::setCTM(const Mat3x3& ctm_) { + ctm = ctm_; + ctmUpdated = true; + g_pCompositor->scheduleFrameForMonitor(this, Aquamarine::IOutput::scheduleFrameReason::AQ_SCHEDULE_NEEDS_FRAME); +} + bool CMonitor::attemptDirectScanout() { if (!mirrors.empty() || isMirror() || g_pHyprRenderer->m_bDirectScanoutBlocked) return false; // do not DS if this monitor is being mirrored. Will break the functionality. diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index 2a2edab6..f5068dba 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -131,6 +131,10 @@ class CMonitor { CMonitor* pMirrorOf = nullptr; std::vector<CMonitor*> mirrors; + // ctm + Mat3x3 ctm = Mat3x3::identity(); + bool ctmUpdated = false; + // for tearing PHLWINDOWREF solitaryClient; @@ -179,6 +183,7 @@ class CMonitor { CBox logicalBox(); void scheduleDone(); bool attemptDirectScanout(); + void setCTM(const Mat3x3& ctm); bool m_bEnabled = false; bool m_bRenderingInitPassed = false; |