mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 11:05:58 +01:00
parent
414e37996d
commit
a9d7526aae
3 changed files with 7 additions and 1 deletions
|
@ -2808,6 +2808,8 @@ void CCompositor::enterUnsafeState() {
|
|||
m_pUnsafeOutput->onConnect(false);
|
||||
|
||||
m_bUnsafeState = true;
|
||||
|
||||
setActiveMonitor(m_pUnsafeOutput);
|
||||
}
|
||||
|
||||
void CCompositor::leaveUnsafeState() {
|
||||
|
|
|
@ -53,6 +53,10 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
|||
static auto PNEWTAKESOVERFS = CConfigValue<Hyprlang::INT>("misc:new_window_takes_over_fullscreen");
|
||||
|
||||
auto PMONITOR = g_pCompositor->m_pLastMonitor;
|
||||
if (!g_pCompositor->m_pLastMonitor) {
|
||||
g_pCompositor->setActiveMonitor(g_pCompositor->getMonitorFromVector({}));
|
||||
PMONITOR = g_pCompositor->m_pLastMonitor;
|
||||
}
|
||||
auto PWORKSPACE = PMONITOR->specialWorkspaceID ? g_pCompositor->getWorkspaceByID(PMONITOR->specialWorkspaceID) : g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
|
||||
PWINDOW->m_iMonitorID = PMONITOR->ID;
|
||||
PWINDOW->m_iWorkspaceID = PMONITOR->specialWorkspaceID ? PMONITOR->specialWorkspaceID : PMONITOR->activeWorkspace;
|
||||
|
|
|
@ -310,7 +310,7 @@ void CMonitor::onDisconnect(bool destroy) {
|
|||
Debug::log(WARN, "wlr_output_commit_state failed in CMonitor::onDisconnect");
|
||||
|
||||
if (g_pCompositor->m_pLastMonitor == this)
|
||||
g_pCompositor->setActiveMonitor(BACKUPMON);
|
||||
g_pCompositor->setActiveMonitor(BACKUPMON ? BACKUPMON : g_pCompositor->m_pUnsafeOutput);
|
||||
|
||||
if (g_pHyprRenderer->m_pMostHzMonitor == this) {
|
||||
int mostHz = 0;
|
||||
|
|
Loading…
Reference in a new issue