i.Dark_Templar added a comment.

  > 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 
:)
  
  There's condition in function 'void 
DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher 
*watcher)' around line 494:
  
    if (needRefresh || menu->actions().isEmpty()) {
  
  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).
  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.
  
  > Try adding this patch, add the appmenubar widget, run the test app in the 
libdbusmenuqt folder and click "Menu C".
  > With this patch you can't open that menu at all.
  
  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?

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D7260

To: i.Dark_Templar, #plasma, davidedmundson
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart, lukas

Reply via email to