diff options
| author | thejch <66577496+thejch@users.noreply.github.com> | 2024-03-07 05:23:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-07 13:23:22 +0000 |
| commit | bf71026b8d31edc86a97222ef0fbec4972635cac (patch) | |
| tree | cebba9c39d9d98c56284d36ca07af49f42ae87b4 /src/layout/MasterLayout.cpp | |
| parent | 77161fdbef72033ea1989e4c4d386a5732bd6bf0 (diff) | |
master: change active monitor when moving windows around (#5001)
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index c7e09186..4cff8bed 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -977,6 +977,8 @@ void CHyprMasterLayout::moveWindowTo(CWindow* pWindow, const std::string& dir) { onWindowRemovedTiling(pWindow); pWindow->moveToWorkspace(PWINDOW2->m_iWorkspaceID); pWindow->m_iMonitorID = PWINDOW2->m_iMonitorID; + const auto pMonitor = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); + g_pCompositor->setActiveMonitor(pMonitor); onWindowCreatedTiling(pWindow); } else { // if same monitor, switch windows |
