hyprland/focus_grab: handle destruction of tracked windows

This commit is contained in:
outfoxxed 2026-03-18 02:34:06 -07:00
parent 3520c85d77
commit 0cb62920a7
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
11 changed files with 67 additions and 102 deletions

View file

@ -57,6 +57,12 @@ ProxyWindowBase::ProxyWindowBase(QObject* parent)
ProxyWindowBase::~ProxyWindowBase() { this->deleteWindow(true); }
ProxyWindowBase* ProxyWindowBase::forObject(QObject* obj) {
if (auto* proxy = qobject_cast<ProxyWindowBase*>(obj)) return proxy;
if (auto* iface = qobject_cast<WindowInterface*>(obj)) return iface->proxyWindow();
return nullptr;
}
void ProxyWindowBase::onReload(QObject* oldInstance) {
if (this->mVisible) this->window = this->retrieveWindow(oldInstance);
auto wasVisible = this->window != nullptr && this->window->isVisible();