Bug 424831

Summary: When KDE desktop is active, global menu of the app is moved to the widget no matter which display the application is connected to
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: Sektor van Skijlen <ethouris>
Component: generalAssignee: Kai Uwe Broulik <kde>
Status: REPORTED ---    
Severity: minor CC: mvourlakos, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 6.13.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sektor van Skijlen 2020-07-30 15:21:25 UTC
SUMMARY

Short version: When I run a KDE application on a Fluxbox running on VNC, it starts without its menu, even if this WM doesn't offer any possibility to use the global menu widget.

Long version: AFAIK the intention of the global menu is to not render it inside the application's window, but only in the external global menu widget. It has been even better made the connection by the fact that in order to activate it you should modify the settings of the window manager and add the menu icon on the application window bar.

The problem is that if I run an application, which is running on a different display, then I expect that:

- this display is using a WM that offers the global menu widget feature (KDE Plasma) and this way the menu is not displayed in the window, instead it is displayed in the global menu widget

- this display is using a WM that doesn't offer the global menu widget feature (including when it does so due to settings in that very WM) and in this case the menu is displayed as usual, inside the application

Currently the situation seems to be such that I need to set up the use of global menu widget by adding appropriate icon in the WM decoration configuration. But then, the menu is "eaten" from every single KDE application, no matter if I display it on the display that is the KDE Plasma Desktop with this setting enabled, or maybe on some completely different display. Moreover, I can have a VNC server running in the background and when I run konsole on it it displays or doesn't display the menu, depending on if at the moment of running I was logged in into the KDE desktop or not.

STEPS TO REPRODUCE
1. Run VNC with some non-KDE WM (e.g. Fluxbox)
2. Keep the KDE desktop in the KDM not logged in
3. Run "konsole" on the VNC WM - it will run with the application menu visible. Do not close this konsole.
4. Log in into KDM to run KDE Plasma Desktop. Make sure that the decorations are configured to display the global menu.
5. Run "konsole" again on VNC WM - it will run without application menu visible.
6. Log out of KDE Plasma desktop and return to KDM
7. Run "konsole" again on VNC WM - it will run with application menu visible.

Note: when a "konsole" is using "New Window" function it will open a new window with the same state of the menu.


OBSERVED RESULT
(described in steps)

EXPECTED RESULT

1. When I run "konsole" on VNC WM, it should always run with menu, regardless as to whether I am logged in in the KDE Plasma Desktop and regardless if the KDE Plasma Desktop is configured to use global menu widget.

2. The KDE applications without displaying menu (and relying on global menu widget) should be only when their window display on the KDE Plasma Desktop's display.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)

KDE Plasma Version: 5.12.8
KDE Frameworks Version: 5.55.0
Qt Version: 5.9.7

openSUSE Leap 15.1
Comment 1 Nate Graham 2023-09-19 20:21:41 UTC
Hello and thank you again for the bug report! Unfortunately we were not able to address it yet, nor even manage to reproduce the issue ourselves. Can we ask you to please check if this issue is still happening with Plasma 5.27?

If it is, please change the status to REPORTED. Thanks a lot!
Comment 2 Sektor van Skijlen 2023-09-20 08:33:31 UTC
(In reply to Nate Graham from comment #1)
> Hello and thank you again for the bug report! Unfortunately we were not able
> to address it yet, nor even manage to reproduce the issue ourselves. Can we
> ask you to please check if this issue is still happening with Plasma 5.27?

It is kinda hard for me to have a desired version installed; I'm using SuSE Leap and
the latest Plasma version there is 5.18.6 and frameworks 5.76.0. And this problem 
is still happening there.

I can't just compile a KDE desired version. I could install some other Linux distro that
contains a KDE Plasma version where this isn't reproducible, if you know about such
a distribution, please let me know and I'll try (I have one spare old computer where
I can just install it).

Let me reiterate, where the problem is:

1. There is a KDE Desktop that can be run from KDM, plus a second display (likely VNC with some non-KDE WM). This VNC server should be at best started after bootup by connecting through SSH to this machine and starting VNC server from the console. In the KDE Plasma Desktop the Global Menu should be configured. You can try and run "konsole" on the Plasma desktop and see that it starts without the menu, with the application's menu displayed on the dedicated menu widget.

2. Stay logged out from the KDE Desktop and open "konsole" on this second display (on VNC) - it will run WITH the application menu.

3. Log in into the KDE Desktop to start the KDE Plasma. Switch again to the VNC-connected display where you already ran "konsole" before and it is run with the menu. Type "konsole" on konsole and this will open a new konsole window, just this time WITHOUT the application menu.

As I said, advise me some Linux distro that installs KDE in the version that you believe has fixed this problem and I'll retest. I'm changing this to REPORTED just to avoid any forever waiting.
Comment 3 Nate Graham 2023-09-20 17:44:35 UTC
Thanks for following up!

Pretty much any distro will offer newer software, including a later version of openSUSE Leap. See for example https://get.opensuse.org/leap/15.5.