summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2022-09-19 10:23:13 +0100
committervaxerski <vaxry@vaxry.net>2022-09-19 10:23:13 +0100
commit7c809a3059388b8fdbb3de4aca68656c01162f4f (patch)
tree1b1a568396d47ebb4234cacc77ccf86cb831ec3c /src/Compositor.cpp
parent4070e1a148663962ba8f2eff4eeaf018fe6d863b (diff)
fullscreen animation en-nice-ment
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index b8b76039..0d84bcdb 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -826,7 +826,7 @@ CWindow* CCompositor::getWindowForPopup(wlr_xdg_popup* popup) {
wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::vector<std::unique_ptr<SLayerSurface>>* layerSurfaces, Vector2D* sCoords, SLayerSurface** ppLayerSurfaceFound) {
for (auto it = layerSurfaces->rbegin(); it != layerSurfaces->rend(); it++) {
- if ((*it)->fadingOut || !(*it)->layerSurface || ((*it)->layerSurface && !(*it)->layerSurface->mapped))
+ if ((*it)->fadingOut || !(*it)->layerSurface || ((*it)->layerSurface && !(*it)->layerSurface->mapped) || (*it)->alpha.fl() == 0.f)
continue;
const auto SURFACEAT = wlr_layer_surface_v1_surface_at((*it)->layerSurface, pos.x - (*it)->geometry.x, pos.y - (*it)->geometry.y, &sCoords->x, &sCoords->y);
@@ -1617,6 +1617,12 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode
if (w->m_iWorkspaceID == pWindow->m_iWorkspaceID)
w->m_bCreatedOverFullscreen = false;
}
+
+ const auto PMONITOR = getMonitorFromID(pWindow->m_iMonitorID);
+
+ for (auto& ls : PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_TOP]) {
+ ls->alpha = pWindow->m_bIsFullscreen && mode == FULLSCREEN_FULL ? 0.f : 255.f;
+ }
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv(), true);