From 2a5ef4e173ff7f24e4a7e895b73978ff0a7b97b6 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sat, 9 Jan 2021 18:29:56 +0000 Subject: [PATCH] [libtaskmanager] Notify when appmenu path changes This isn't always static, espcially in GTK apps where the xproperty is set later by gmenuproxyodel. The Appmenu applet already watches for this role changing, but it wasn't hooked up. The wayland implementation does not have the same bug. BUG: 422786 --- libtaskmanager/xwindowtasksmodel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libtaskmanager/xwindowtasksmodel.cpp b/libtaskmanager/xwindowtasksmodel.cpp index ee2e53b6f..181789d82 100644 --- a/libtaskmanager/xwindowtasksmodel.cpp +++ b/libtaskmanager/xwindowtasksmodel.cpp @@ -398,6 +398,14 @@ void XWindowTasksModel::Private::windowChanged(WId window, NET::Properties prope changedRoles << Activities; } + if (properties2 & NET::WM2AppMenuServiceName) { + changedRoles << ApplicationMenuServiceName; + } + + if (properties2 & NET::WM2AppMenuObjectPath) { + changedRoles << ApplicationMenuObjectPath; + } + if (wipeInfoCache) { delete windowInfoCache.take(window); }