mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-08-16 16:50:23 +03:00
move unsafe checks to frame
This commit is contained in:
parent
649a37f9b9
commit
f5149524e8
@ -2020,9 +2020,6 @@ void CConfigManager::performMonitorReload() {
|
||||
if (overAgain)
|
||||
performMonitorReload();
|
||||
|
||||
if (!g_pCompositor->m_vMonitors.empty()) // reset unsafe state if we have monitors
|
||||
g_pCompositor->leaveUnsafeState();
|
||||
|
||||
m_bWantsMonitorReload = false;
|
||||
|
||||
EMIT_HOOK_EVENT("monitorLayoutChanged", nullptr);
|
||||
|
@ -112,7 +112,6 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
||||
}
|
||||
|
||||
g_pCompositor->m_bReadyToProcess = true;
|
||||
g_pCompositor->leaveUnsafeState();
|
||||
}
|
||||
|
||||
g_pConfigManager->m_bWantsMonitorReload = true;
|
||||
@ -139,6 +138,11 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||
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_bUnsafeState && PMONITOR->output != g_pCompositor->m_pUnsafeOutput) {
|
||||
// restore from unsafe state
|
||||
g_pCompositor->leaveUnsafeState();
|
||||
}
|
||||
|
||||
return; // cannot draw on session inactive (different tty)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user