mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-13 09:25:59 +01:00
stuff
This commit is contained in:
parent
bcea65ab09
commit
9f761a9590
2 changed files with 12 additions and 12 deletions
|
@ -1155,7 +1155,8 @@ int CWindow::getRealBorderSize() {
|
|||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -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