mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-08 11:38:14 +02:00
layershell: fix popup crash with nullptr mon (#13763)
This commit is contained in:
parent
3a72064510
commit
aef76309d8
1 changed files with 6 additions and 7 deletions
|
|
@ -199,9 +199,8 @@ void CPopup::onMap() {
|
||||||
m_wlSurface->resource()->breadthfirst([PMONITOR](SP<CWLSurfaceResource> s, const Vector2D& offset, void* d) { s->enter(PMONITOR->m_self.lock()); }, nullptr);
|
m_wlSurface->resource()->breadthfirst([PMONITOR](SP<CWLSurfaceResource> s, const Vector2D& offset, void* d) { s->enter(PMONITOR->m_self.lock()); }, nullptr);
|
||||||
|
|
||||||
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
|
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
|
||||||
auto mon = g_pCompositor->getMonitorFromID(m_layerOwner->m_layer);
|
if (m_layerOwner->m_monitor)
|
||||||
if (mon)
|
m_layerOwner->m_monitor->m_blurFBDirty = true;
|
||||||
mon->m_blurFBDirty = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_alpha->setConfig(g_pConfigManager->getAnimationPropertyConfig("fadePopupsIn"));
|
m_alpha->setConfig(g_pConfigManager->getAnimationPropertyConfig("fadePopupsIn"));
|
||||||
|
|
@ -254,8 +253,8 @@ void CPopup::onUnmap() {
|
||||||
m_subsurfaceHead.reset();
|
m_subsurfaceHead.reset();
|
||||||
|
|
||||||
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
|
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
|
||||||
const auto mon = g_pCompositor->getMonitorFromID(m_layerOwner->m_layer);
|
if (m_layerOwner->m_monitor)
|
||||||
mon->m_blurFBDirty = true;
|
m_layerOwner->m_monitor->m_blurFBDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// damage all children
|
// damage all children
|
||||||
|
|
@ -321,8 +320,8 @@ void CPopup::onCommit(bool ignoreSiblings) {
|
||||||
m_requestedReposition = false;
|
m_requestedReposition = false;
|
||||||
|
|
||||||
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
|
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
|
||||||
const auto mon = g_pCompositor->getMonitorFromID(m_layerOwner->m_layer);
|
if (m_layerOwner->m_monitor)
|
||||||
mon->m_blurFBDirty = true;
|
m_layerOwner->m_monitor->m_blurFBDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue