mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-25 10:49:49 +01:00
fix moved windows losing props
This commit is contained in:
parent
41f5d56c4e
commit
7a4b5b2dea
1 changed files with 6 additions and 12 deletions
|
@ -1359,9 +1359,10 @@ void CWindowManager::moveActiveWindowToWorkspace(int workspace) {
|
||||||
const auto SAVEDFLOATSTATUS = PWINDOW->getIsFloating();
|
const auto SAVEDFLOATSTATUS = PWINDOW->getIsFloating();
|
||||||
const auto SAVEDDRAWABLE = PWINDOW->getDrawable();
|
const auto SAVEDDRAWABLE = PWINDOW->getDrawable();
|
||||||
|
|
||||||
closeWindowAllChecks(SAVEDDRAWABLE);
|
fixWindowOnClose(PWINDOW);
|
||||||
|
|
||||||
// PWINDOW is dead!
|
if (const auto WORKSPACE = getWorkspaceByID(PWINDOW->getWorkspaceID()); WORKSPACE && PWINDOW->getFullscreen())
|
||||||
|
WORKSPACE->setHasFullscreenWindow(false);
|
||||||
|
|
||||||
changeWorkspaceByID(workspace);
|
changeWorkspaceByID(workspace);
|
||||||
|
|
||||||
|
@ -1386,19 +1387,12 @@ void CWindowManager::moveActiveWindowToWorkspace(int workspace) {
|
||||||
setFocusedWindow(newLastWindow);
|
setFocusedWindow(newLastWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
CWindow newWindow;
|
|
||||||
newWindow.setDrawable(SAVEDDRAWABLE);
|
|
||||||
newWindow.setFirstOpen(false);
|
|
||||||
addWindowToVectorSafe(newWindow);
|
|
||||||
|
|
||||||
CWindow* PNEWWINDOW = nullptr;
|
|
||||||
if (SAVEDFLOATSTATUS)
|
if (SAVEDFLOATSTATUS)
|
||||||
PNEWWINDOW = Events::remapFloatingWindow(SAVEDDRAWABLE, NEWMONITOR);
|
Events::remapFloatingWindow(PWINDOW->getDrawable(), NEWMONITOR);
|
||||||
else
|
else
|
||||||
PNEWWINDOW = Events::remapWindow(SAVEDDRAWABLE, false, NEWMONITOR);
|
Events::remapWindow(PWINDOW->getDrawable(), false, NEWMONITOR);
|
||||||
|
|
||||||
|
PWINDOW->setDefaultSize(SAVEDDEFAULTSIZE);
|
||||||
PNEWWINDOW->setDefaultSize(SAVEDDEFAULTSIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWindowManager::moveActiveWindowTo(char dir) {
|
void CWindowManager::moveActiveWindowTo(char dir) {
|
||||||
|
|
Loading…
Reference in a new issue