Bug 449051

Summary: Latte is too late for global menu (follow up of bug 186 applet-window-appmenu)
Product: [Plasma] lattedock Reporter: JanNowak94
Component: applicationAssignee: Michail Vourlakos <mvourlakos>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: NOR    
Version: 0.10.7   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description JanNowak94 2022-01-24 08:41:54 UTC
SUMMARY

I don't know what KDE changed in their code but it seems that the KDE applications now check if there is a recipient of global menu export at start of application. This has unfortunate side-effect of applet-window-appmenu applet breaking with KDE applications that are restored (I did not check if GTK based applications work same way) or they start at launch but not from typical auto-start like kwalletmanager5. This seems to stem from fact that restored applications (and kwalletmanager5) seem to start up before KDE auto-start (or they start in different threads thus introducing race condition). What effectively happens is latte starts too latte to give response to application that asks for the availability of menu recipient.

Why here (applet-window-menu and Latte) - I don't know where this implementation of KDE appmenu is.

STEPS TO REPRODUCE
A)
1. Use applet-window-appmenu with latte dock (remove any other recipient)
2. Select restore applications
3. Open Dolphin
4. Restart
B)
1. Use applet-window-appmenu with latte dock (remove any other recipient)
2. Select open wallet at start
3. Restart
OBSERVED RESULT
A) Restored applications don't follow up global menu.
B) Wallet manager doesn't follow up global menu.
EXPECTED RESULT
Applications follow up global menu.

TEMPORARY "FIX": restart applications (Wallet Manager need manual SIGINT or SIGTERM) - that however does defeat the point of "restore applications" option.

SOFTWARE/OS VERSIONS
Linux:  Garuda/Arch Linux (current)
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90
Qt Version: 5.15.2 (KDE)
X11
ADDITIONAL INFORMATION
This is follow up of https://github.com/psifidotos/applet-window-appmenu/issues/186  in "applet-window-appmenu".
Comment 1 Michail Vourlakos 2022-01-25 09:34:59 UTC
Latte starting up at the end of startup stack which is also the phase of normal windows it is intentional... Plenty of startup issues were related to this so this is intentional for Latte in order to solve all the previous startup issues that were related to not plasma be ready, to not kwin be ready, or any other destkop service to not be ready.

At the same time the appmenu service is started ONLY WHEN it is requested by an applet or from a window titlebar....

So the only solution from my perspective is for APPMENU service to give the option to the user to be started ALWAYS early in the stack.

If you want to report this for APPMENU service, you can do so at : plasmashell->Global Menu