From e0bfec6ef2507de3f13e1d4690adfe195cf1643c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:47:31 +0200 Subject: added experimental:vfr --- src/debug/HyprCtl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/debug/HyprCtl.cpp') 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)); } -- cgit v1.2.3