mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
service/tray: disconnect menu from handle on deletion
Fixes loaded being set to true after deleting the menu.
This commit is contained in:
1 file changed
+3
@@ -545,6 +545,9 @@ void DBusMenuHandle::onMenuPathChanged() {
|
||||
qCDebug(logDbusMenu) << "Updating" << this << "with refcount" << this->refcount;
|
||||
|
||||
if (this->mMenu) {
|
||||
// Without this, layout updated can be sent after mMenu is set to null,
|
||||
// leaving loaded = true while mMenu = nullptr.
|
||||
QObject::disconnect(&this->mMenu->rootItem, nullptr, this, nullptr);
|
||||
this->mMenu->deleteLater();
|
||||
this->mMenu = nullptr;
|
||||
this->loaded = false;
|
||||
|
||||
Reference in new issue
Block a user