desktop: cleanup, unify desktop elements as views (#12563)

This commit is contained in:
Vaxry 2025-12-08 15:04:40 +00:00 committed by GitHub
parent 834f019bab
commit 920353370b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 2636 additions and 2337 deletions

View file

@ -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() {