<table><tr><td style="">i.Dark_Templar added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7260" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>That's not entirely true. We do show the cached version, but also immediately call aboutToShow which will update the subtree. In theory at least :)</p></blockquote>
<p>There's condition in function 'void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher *watcher)' around line 494:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (needRefresh || menu->actions().isEmpty()) {</pre></div>
<p>needRefresh is a value from dbus. Since another application already issued 'LayoutUpdate' event, needRefresh is false (it should be already refreshed, while it's actually not). And menu->actions() is not empty since it uses cached submenu (this is no longer true with this patch, this patch ensures that menu->actions() is empty).<br />
I think another flag may be stored, for example ActionForId map may be expanded for that use case. But I don't see much difference in the end result.</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Try adding this patch, add the appmenubar widget, run the test app in the libdbusmenuqt folder and click "Menu C".<br />
With this patch you can't open that menu at all.</p></blockquote>
<p>I couldn't reproduce the issue with this patch (I'm already using it). I'm using 'oxygen' theme in plasma/X11. I'm setting in "systemsettings -> Application style -> Widget style -> Fine tuning" value of "Menubar style" to "Application Menu widget", then I'm adding appmenu widget to my desktop and running appmenutest from plasma-workspace/libdbusmenu-qt/test and "Menu C" is working fine, it's showing up and displaying correct time (updating displayed time every time I'm opening "Menu C" again). Did I miss something?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7260" rel="noreferrer">https://phabricator.kde.org/D7260</a></div></div><br /><div><strong>To: </strong>i.Dark_Templar, Plasma, davidedmundson<br /><strong>Cc: </strong>plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas<br /></div>