mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-29 19:34:47 +00:00
desktopAnimationMgr: don't set fade 0 for members of a fs group (#12091)
fixes a flash of opacity that shouldnt be there
This commit is contained in:
parent
892f642f58
commit
057695bc3f
@ -1037,6 +1037,16 @@ PHLWINDOW CWindow::getGroupWindowByIndex(int index) {
|
|||||||
return curr;
|
return curr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CWindow::hasInGroup(PHLWINDOW w) {
|
||||||
|
PHLWINDOW curr = m_groupData.pNextWindow.lock();
|
||||||
|
while (curr && curr != m_self) {
|
||||||
|
if (curr == w)
|
||||||
|
return true;
|
||||||
|
curr = curr->m_groupData.pNextWindow.lock();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void CWindow::setGroupCurrent(PHLWINDOW pWindow) {
|
void CWindow::setGroupCurrent(PHLWINDOW pWindow) {
|
||||||
PHLWINDOW curr = m_groupData.pNextWindow.lock();
|
PHLWINDOW curr = m_groupData.pNextWindow.lock();
|
||||||
bool isMember = false;
|
bool isMember = false;
|
||||||
|
|||||||
@ -379,6 +379,7 @@ class CWindow {
|
|||||||
PHLWINDOW getGroupCurrent();
|
PHLWINDOW getGroupCurrent();
|
||||||
PHLWINDOW getGroupPrevious();
|
PHLWINDOW getGroupPrevious();
|
||||||
PHLWINDOW getGroupWindowByIndex(int);
|
PHLWINDOW getGroupWindowByIndex(int);
|
||||||
|
bool hasInGroup(PHLWINDOW);
|
||||||
int getGroupSize();
|
int getGroupSize();
|
||||||
bool canBeGroupedInto(PHLWINDOW pWindow);
|
bool canBeGroupedInto(PHLWINDOW pWindow);
|
||||||
void setGroupCurrent(PHLWINDOW pWindow);
|
void setGroupCurrent(PHLWINDOW pWindow);
|
||||||
|
|||||||
@ -459,6 +459,8 @@ void CDesktopAnimationManager::setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnim
|
|||||||
|
|
||||||
const auto FULLSCREEN = type == ANIMATION_TYPE_IN;
|
const auto FULLSCREEN = type == ANIMATION_TYPE_IN;
|
||||||
|
|
||||||
|
const auto FSWINDOW = ws->getFullscreenWindow();
|
||||||
|
|
||||||
for (auto const& w : g_pCompositor->m_windows) {
|
for (auto const& w : g_pCompositor->m_windows) {
|
||||||
if (w->m_workspace == ws) {
|
if (w->m_workspace == ws) {
|
||||||
|
|
||||||
@ -467,8 +469,11 @@ void CDesktopAnimationManager::setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnim
|
|||||||
|
|
||||||
if (!FULLSCREEN)
|
if (!FULLSCREEN)
|
||||||
*w->m_alpha = 1.F;
|
*w->m_alpha = 1.F;
|
||||||
else if (!w->isFullscreen())
|
else if (!w->isFullscreen()) {
|
||||||
*w->m_alpha = !w->m_createdOverFullscreen ? 0.f : 1.f;
|
const bool CREATED_OVER_FS = w->m_createdOverFullscreen;
|
||||||
|
const bool IS_IN_GROUP_OF_FS = FSWINDOW && FSWINDOW->hasInGroup(w);
|
||||||
|
*w->m_alpha = !CREATED_OVER_FS && !IS_IN_GROUP_OF_FS ? 0.f : 1.f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user