mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-24 18:49:49 +01:00
stuff
This commit is contained in:
parent
81bad1f8fc
commit
920e34efa1
2 changed files with 12 additions and 12 deletions
|
@ -1200,7 +1200,8 @@ int CWindow::getRealBorderSize() {
|
|||
}
|
||||
|
||||
bool CWindow::canBeTorn() {
|
||||
return (m_sAdditionalConfigData.forceTearing.toUnderlying() || m_bTearingHint);
|
||||
static auto PTEARING = CConfigValue<Hyprlang::INT>("general:allow_tearing");
|
||||
return (m_sAdditionalConfigData.forceTearing.toUnderlying() || m_bTearingHint) && *PTEARING;
|
||||
}
|
||||
|
||||
bool CWindow::shouldSendFullscreenState() {
|
||||
|
|
|
@ -26,19 +26,18 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
|||
|
||||
CMonitor* const PMONITOR = (CMonitor*)owner;
|
||||
|
||||
// FIXME:
|
||||
// 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!");
|
||||
if ((g_pCompositor->m_pAqBackend->hasSession() && !g_pCompositor->m_pAqBackend->session->active) || !g_pCompositor->m_bSessionActive || g_pCompositor->m_bUnsafeState) {
|
||||
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) {
|
||||
// return m->output != g_pCompositor->m_pUnsafeOutput->output;
|
||||
// })) {
|
||||
// // restore from unsafe state
|
||||
// g_pCompositor->leaveUnsafeState();
|
||||
// }
|
||||
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;
|
||||
})) {
|
||||
// restore from unsafe state
|
||||
g_pCompositor->leaveUnsafeState();
|
||||
}
|
||||
|
||||
// return; // cannot draw on session inactive (different tty)
|
||||
// }
|
||||
return; // cannot draw on session inactive (different tty)
|
||||
}
|
||||
|
||||
if (!PMONITOR->m_bEnabled)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue