This commit is contained in:
Vaxry 2024-06-28 14:03:04 +02:00
parent bcea65ab09
commit 9f761a9590
2 changed files with 12 additions and 12 deletions

View File

@ -1155,7 +1155,8 @@ int CWindow::getRealBorderSize() {
} }
bool CWindow::canBeTorn() { bool CWindow::canBeTorn() {
return m_sWindowData.tearing.valueOr(m_bTearingHint); static auto PTEARING = CConfigValue<Hyprlang::INT>("general:allow_tearing");
return m_sWindowData.tearing.valueOr(m_bTearingHint) && *PTEARING;
} }
bool CWindow::shouldSendFullscreenState() { bool CWindow::shouldSendFullscreenState() {

View File

@ -26,19 +26,18 @@ void Events::listener_monitorFrame(void* owner, void* data) {
CMonitor* const PMONITOR = (CMonitor*)owner; CMonitor* const PMONITOR = (CMonitor*)owner;
// FIXME: if ((g_pCompositor->m_pAqBackend->hasSession() && !g_pCompositor->m_pAqBackend->session->active) || !g_pCompositor->m_bSessionActive || g_pCompositor->m_bUnsafeState) {
// if ((g_pCompositor->m_sWLRSession && !g_pCompositor->m_sWLRSession->active) || !g_pCompositor->m_bSessionActive || g_pCompositor->m_bUnsafeState) { Debug::log(WARN, "Attempted to render frame on inactive session!");
// Debug::log(WARN, "Attempted to render frame on inactive session!");
// if (g_pCompositor->m_bUnsafeState && std::ranges::any_of(g_pCompositor->m_vMonitors.begin(), g_pCompositor->m_vMonitors.end(), [&](auto& m) { if (g_pCompositor->m_bUnsafeState && std::ranges::any_of(g_pCompositor->m_vMonitors.begin(), g_pCompositor->m_vMonitors.end(), [&](auto& m) {
// return m->output != g_pCompositor->m_pUnsafeOutput->output; return m->output != g_pCompositor->m_pUnsafeOutput->output;
// })) { })) {
// // restore from unsafe state // restore from unsafe state
// g_pCompositor->leaveUnsafeState(); g_pCompositor->leaveUnsafeState();
// } }
// return; // cannot draw on session inactive (different tty) return; // cannot draw on session inactive (different tty)
// } }
if (!PMONITOR->m_bEnabled) if (!PMONITOR->m_bEnabled)
return; return;