Skip to content

Commit

Permalink
window: revert only set m_iMonitorMovedFrom, when moving to a differe…
Browse files Browse the repository at this point in the history
…nt monitor

This reverts commit 089fdd1.

Great commit.
  • Loading branch information
vaxerski committed Jan 25, 2025
1 parent 9199a97 commit 45c3787
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) {
}

// opacity
const auto PWORKSPACE = pWindow->m_pWorkspace;
if (pWindow->isEffectiveInternalFSMode(FSMODE_FULLSCREEN)) {
*pWindow->m_fActiveInactiveAlpha = pWindow->m_sWindowData.alphaFullscreen.valueOrDefault().applyAlpha(*PFULLSCREENALPHA);
} else {
Expand Down
5 changes: 2 additions & 3 deletions src/desktop/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,12 @@ void CWindow::moveToWorkspace(PHLWORKSPACE pWorkspace) {

static auto PCLOSEONLASTSPECIAL = CConfigValue<Hyprlang::INT>("misc:close_special_on_empty");

const auto OLDWORKSPACE = m_pWorkspace;
const bool TOANOTHERMONITOR = OLDWORKSPACE && OLDWORKSPACE->monitorID() != pWorkspace->monitorID();
const auto OLDWORKSPACE = m_pWorkspace;

m_fMovingToWorkspaceAlpha->setValueAndWarp(1.F);
*m_fMovingToWorkspaceAlpha = 0.F;
m_fMovingToWorkspaceAlpha->setCallbackOnEnd([this](auto) { m_iMonitorMovedFrom = -1; });
m_iMonitorMovedFrom = TOANOTHERMONITOR ? OLDWORKSPACE->monitorID() : -1;
m_iMonitorMovedFrom = OLDWORKSPACE ? OLDWORKSPACE->monitorID() : -1;

m_pWorkspace = pWorkspace;

Expand Down

0 comments on commit 45c3787

Please sign in to comment.