desktop: restore invisible floating window alpha/opacity when focused over fullscreen (#12994)
This commit is contained in:
parent
6c3ebed76e
commit
e7985ca4c4
5 changed files with 51 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "../../managers/HookSystemManager.hpp"
|
||||
#include "../../xwayland/XSurface.hpp"
|
||||
#include "../../protocols/PointerConstraints.hpp"
|
||||
#include "managers/animation/DesktopAnimationManager.hpp"
|
||||
|
||||
using namespace Desktop;
|
||||
|
||||
|
|
@ -32,6 +33,7 @@ static SFullscreenWorkspaceFocusResult onFullscreenWorkspaceFocusWindow(PHLWINDO
|
|||
if (pWindow->m_isFloating) {
|
||||
// if the window is floating, just bring it to the top
|
||||
pWindow->m_createdOverFullscreen = true;
|
||||
g_pDesktopAnimationManager->setFullscreenFloatingFade(pWindow, 1.f);
|
||||
g_pHyprRenderer->damageWindow(pWindow);
|
||||
return {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "../../config/ConfigManager.hpp"
|
||||
#include "../../Compositor.hpp"
|
||||
#include "desktop/DesktopTypes.hpp"
|
||||
#include "wlr-layer-shell-unstable-v1.hpp"
|
||||
|
||||
void CDesktopAnimationManager::startAnimation(PHLWINDOW pWindow, eAnimationType type, bool force) {
|
||||
|
|
@ -484,6 +485,13 @@ void CDesktopAnimationManager::setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnim
|
|||
}
|
||||
}
|
||||
|
||||
void CDesktopAnimationManager::setFullscreenFloatingFade(PHLWINDOW pWindow, float fade) {
|
||||
if (pWindow->m_fadingOut || !pWindow->m_isFloating)
|
||||
return;
|
||||
|
||||
*pWindow->m_alpha = fade;
|
||||
}
|
||||
|
||||
void CDesktopAnimationManager::overrideFullscreenFadeAmount(PHLWORKSPACE ws, float fade, PHLWINDOW exclude) {
|
||||
for (auto const& w : g_pCompositor->m_windows) {
|
||||
if (w == exclude)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class CDesktopAnimationManager {
|
|||
void startAnimation(PHLWORKSPACE ws, eAnimationType type, bool left = true, bool instant = false);
|
||||
|
||||
void setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnimationType type);
|
||||
void setFullscreenFloatingFade(PHLWINDOW pWindow, float fade);
|
||||
void overrideFullscreenFadeAmount(PHLWORKSPACE ws, float fade, PHLWINDOW exclude = nullptr);
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue