roll VFR for everyone

This commit is contained in:
vaxerski
2022-07-11 23:56:24 +02:00
parent f461ea3105
commit c0c75db621
3 changed files with 17 additions and 43 deletions

View File

@@ -271,12 +271,11 @@ 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);
}
// TODO: is this safe...?
// this might be a race condition
// tested with 2 instances of `watch -n 0.1 hyprctl splash` and seems to not crash so I'll take that as a yes
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));