From 3cc7ced3a0eae1905e558372671d3c079d3ad938 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Fri, 4 Jul 2025 17:58:55 -0700 Subject: [PATCH] core/window: fix QsWindow being null for WlrLayershell --- src/window/proxywindow.cpp | 3 ++- src/window/proxywindow.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/window/proxywindow.cpp b/src/window/proxywindow.cpp index df9b6b3d..81f43344 100644 --- a/src/window/proxywindow.cpp +++ b/src/window/proxywindow.cpp @@ -542,7 +542,8 @@ void ProxyWindowAttached::updateWindow() { void ProxyWindowAttached::setWindow(ProxyWindowBase* window) { if (window == this->mWindow) return; this->mWindow = window; - this->mWindowInterface = window ? qobject_cast(window->parent()) : nullptr; + auto* parentInterface = window ? qobject_cast(window->parent()) : nullptr; + this->mWindowInterface = parentInterface ? static_cast(parentInterface) : window; emit this->windowChanged(); } diff --git a/src/window/proxywindow.hpp b/src/window/proxywindow.hpp index 42039414..1d075166 100644 --- a/src/window/proxywindow.hpp +++ b/src/window/proxywindow.hpp @@ -220,7 +220,7 @@ protected: private: ProxyWindowBase* mWindow = nullptr; - WindowInterface* mWindowInterface = nullptr; + QObject* mWindowInterface = nullptr; void setWindow(ProxyWindowBase* window); };