summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-04 17:47:31 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-04 17:47:31 +0200
commite0bfec6ef2507de3f13e1d4690adfe195cf1643c (patch)
treef77f0bcfd004949e3f67fe09f7c45189f2978406 /src/debug/HyprCtl.cpp
parentc40ef59a3570e2d80a0b15131e6964c3c5e14408 (diff)
added experimental:vfr
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index eb6c085c..65b45901 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -264,6 +264,14 @@ void HyprCtl::tickHyprCtl() {
}
std::string getRequestFromThread(std::string rq) {
+ // we need to do something to wake hyprland up if VFR is enabled
+ static auto *const VFRENABLED = &g_pConfigManager->getConfigValuePtr("experimental:vfr")->intValue;
+ if (*VFRENABLED) {
+ // TODO: is this safe...?
+ // this might be a race condition
+ wlr_output_schedule_frame(g_pCompositor->m_vMonitors.front()->output);
+ }
+
while (HyprCtl::request != "" || HyprCtl::requestMade || HyprCtl::requestReady) {
std::this_thread::sleep_for(std::chrono::milliseconds(5));
}