desktop/layer: store aboveFs property and use that
This commit is contained in:
parent
59438908de
commit
7098558420
7 changed files with 53 additions and 45 deletions
|
|
@ -164,8 +164,9 @@ void CLayerSurface::onDestroy() {
|
|||
void CLayerSurface::onMap() {
|
||||
Debug::log(LOG, "LayerSurface {:x} mapped", rc<uintptr_t>(m_layerSurface.get()));
|
||||
|
||||
m_mapped = true;
|
||||
m_interactivity = m_layerSurface->m_current.interactivity;
|
||||
m_mapped = true;
|
||||
m_interactivity = m_layerSurface->m_current.interactivity;
|
||||
m_aboveFullscreen = true;
|
||||
|
||||
m_ruleApplicator->propertiesChanged(Desktop::Rule::RULE_PROP_ALL);
|
||||
|
||||
|
|
@ -330,23 +331,10 @@ void CLayerSurface::onCommit() {
|
|||
}
|
||||
}
|
||||
|
||||
// update alpha when window is in fullscreen
|
||||
auto PWORKSPACE = PMONITOR->m_activeSpecialWorkspace ? PMONITOR->m_activeSpecialWorkspace : PMONITOR->m_activeWorkspace;
|
||||
if (PWORKSPACE && PWORKSPACE->m_fullscreenMode == FSMODE_FULLSCREEN) {
|
||||
// warp if switching render layer so we don't see glitches and have clean fade
|
||||
if ((m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND || m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) &&
|
||||
(m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP || m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY))
|
||||
m_alpha->setValueAndWarp(0.f);
|
||||
m_layer = m_layerSurface->m_current.layer;
|
||||
m_aboveFullscreen = true;
|
||||
|
||||
// from overlay to top
|
||||
if (m_layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY && m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP)
|
||||
*m_alpha = 0.f;
|
||||
// to overlay
|
||||
if (m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY)
|
||||
*m_alpha = 1.f;
|
||||
}
|
||||
|
||||
m_layer = m_layerSurface->m_current.layer;
|
||||
g_pDesktopAnimationManager->setFullscreenFadeAnimation(PMONITOR->m_activeWorkspace, CDesktopAnimationManager::ANIMATION_TYPE_IN);
|
||||
|
||||
if (m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND || m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM)
|
||||
g_pHyprOpenGL->markBlurDirtyForMonitor(PMONITOR); // so that blur is recalc'd
|
||||
|
|
|
|||
|
|
@ -45,9 +45,10 @@ namespace Desktop::View {
|
|||
|
||||
PHLMONITORREF m_monitor;
|
||||
|
||||
bool m_fadingOut = false;
|
||||
bool m_readyToDelete = false;
|
||||
bool m_noProcess = false;
|
||||
bool m_fadingOut = false;
|
||||
bool m_readyToDelete = false;
|
||||
bool m_noProcess = false;
|
||||
bool m_aboveFullscreen = true;
|
||||
|
||||
UP<Desktop::Rule::CLayerRuleApplicator> m_ruleApplicator;
|
||||
|
||||
|
|
|
|||
|
|
@ -338,14 +338,14 @@ void CPopup::reposition() {
|
|||
m_resource->applyPositioning(box, COORDS);
|
||||
}
|
||||
|
||||
SP<Desktop::View::CWLSurface> CPopup::getT1Owner() const {
|
||||
SP<Desktop::View::CWLSurface> CPopup::getT1Owner() const {
|
||||
if (m_windowOwner)
|
||||
return m_windowOwner->wlSurface();
|
||||
else
|
||||
return m_layerOwner->wlSurface();
|
||||
}
|
||||
|
||||
Vector2D CPopup::coordsRelativeToParent() const {
|
||||
Vector2D CPopup::coordsRelativeToParent() const {
|
||||
Vector2D offset;
|
||||
|
||||
if (!m_resource)
|
||||
|
|
@ -365,11 +365,11 @@ Vector2D CPopup::coordsRelativeToParent() const {
|
|||
return offset;
|
||||
}
|
||||
|
||||
Vector2D CPopup::coordsGlobal() const {
|
||||
Vector2D CPopup::coordsGlobal() const {
|
||||
return localToGlobal(coordsRelativeToParent());
|
||||
}
|
||||
|
||||
Vector2D CPopup::localToGlobal(const Vector2D& rel) const {
|
||||
Vector2D CPopup::localToGlobal(const Vector2D& rel) const {
|
||||
return t1ParentCoords() + rel;
|
||||
}
|
||||
|
||||
|
|
@ -483,7 +483,7 @@ bool CPopup::inert() const {
|
|||
return m_inert;
|
||||
}
|
||||
|
||||
PHLMONITOR CPopup::getMonitor() const {
|
||||
PHLMONITOR CPopup::getMonitor() const {
|
||||
if (!m_windowOwner.expired())
|
||||
return m_windowOwner->m_monitor.lock();
|
||||
if (!m_layerOwner.expired())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue