summaryrefslogtreecommitdiff
path: root/src/protocols/XDGDialog.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-12-08 15:04:40 +0000
committerGitHub <noreply@github.com>2025-12-08 15:04:40 +0000
commit920353370bba555010506a1c0b204675c60362fe (patch)
tree87ba1036ecad6294a9c86dfc828ed2a356c810bd /src/protocols/XDGDialog.cpp
parent834f019bab5df85b912a7aab7054fc8306f7c52a (diff)
desktop: cleanup, unify desktop elements as views (#12563)
Diffstat (limited to 'src/protocols/XDGDialog.cpp')
-rw-r--r--src/protocols/XDGDialog.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/protocols/XDGDialog.cpp b/src/protocols/XDGDialog.cpp
index c64a8379..ad6b3eeb 100644
--- a/src/protocols/XDGDialog.cpp
+++ b/src/protocols/XDGDialog.cpp
@@ -1,6 +1,6 @@
#include "XDGDialog.hpp"
#include "XDGShell.hpp"
-#include "../desktop/WLSurface.hpp"
+#include "../desktop/view/WLSurface.hpp"
#include "../Compositor.hpp"
#include <algorithm>
@@ -26,11 +26,16 @@ void CXDGDialogV1Resource::updateWindow() {
if UNLIKELY (!m_toplevel || !m_toplevel->m_parent || !m_toplevel->m_parent->m_owner)
return;
- auto HLSurface = CWLSurface::fromResource(m_toplevel->m_parent->m_owner->m_surface.lock());
- if UNLIKELY (!HLSurface || !HLSurface->getWindow())
+ const auto HLSURFACE = Desktop::View::CWLSurface::fromResource(m_toplevel->m_parent->m_owner->m_surface.lock());
+ if UNLIKELY (!HLSURFACE)
return;
- HLSurface->getWindow()->m_ruleApplicator->propertiesChanged(Desktop::Rule::RULE_PROP_MODAL);
+ const auto WINDOW = Desktop::View::CWindow::fromView(HLSURFACE->view());
+
+ if UNLIKELY (!WINDOW)
+ return;
+
+ WINDOW->m_ruleApplicator->propertiesChanged(Desktop::Rule::RULE_PROP_MODAL);
}
bool CXDGDialogV1Resource::good() {