Bug 385951 - Some applications dont show menubar after disabling global menu again
Summary: Some applications dont show menubar after disabling global menu again
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.2.70
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-19 15:13 UTC by info
Modified: 2023-04-22 10:13 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description info 2017-10-19 15:13:23 UTC
When I activate the global menu bar and deactivate it again, some applications (eg okular) have problems to show their application menu bar again.

The user farukdgn already had the same problem but posted his question into the forums. He already described a way how to workaround the problem: https://forum.kde.org/viewtopic.php?f=17&t=140368

The problem is, that okular and the other programs add the entry "MenuBar=Disabled" after activating the global menu. But when you disable the global menu again, the entry will not be removed. When you delete the entry by yourself out of the okularrc file in ~/.config/ folder, the application menu bar will be shown again.

How to reproduce:
1. Go to System settings -> Application style -> Widget style -> Fine tuning, change Menubar style to Title bar button or Application menu widget and Apply changes.
2. Open one of the applications above (there may be more applications with the same issue, I have only discovered Ark, Ksysguard and Okular. But some applications are not bugged, for example Kwrite and KCalc does not have the same issue).
3. Close the application.
4. In the Fine tuning tab, choose In application as Menubar style and Apply changes.
5. Open the application you did in Step 2. There still isn't menu bar in application.
Comment 1 Kai Uwe Broulik 2017-10-20 10:22:56 UTC
What KDE Frameworks version is this? I recall there having been a fix for that but Okular might do something differently? Albert, any idea?
Comment 2 info 2017-10-20 10:35:57 UTC
Thanks for help. The kde frameworks version is 5.38.0.

Actually I do not really understand, why every application seems to add a entry for "MenuBar=Disabled" into its own config file. Why do they not just ask the system (like a environment variable) if they should show the menu bar or not? Are there any further reasons for implementing this that way?
Comment 3 Albert Astals Cid 2017-10-23 21:34:52 UTC
Which okular version are you using?
Comment 4 info 2017-10-24 09:35:44 UTC
My okular version is 17.08.1
Comment 5 Albert Astals Cid 2017-10-24 21:37:38 UTC
About okular, v17.04.3 should have this problem fixed with https://cgit.kde.org/okular.git/commit/?id=3b5f19fd9d67b49a7009b5810c5dd4ecb1a7cede unless Qt decided to change something and the global menubar doesn't return true on menuBar()->isNativeMenuBar() anymore, you should probably open a new bug for each of the apps, but it's not really very prioritary for me, but maybe someone else will have a look.
Comment 6 Kai Uwe Broulik 2017-10-25 08:14:37 UTC
What Qt version are you using?
Comment 7 info 2017-10-25 08:31:13 UTC
My Qt version is 5.9.1
Comment 8 Kai Uwe Broulik 2017-10-25 12:37:31 UTC
I can confirm. I disabled my global menu and now Okular doesn't show its menu bar anymore. I can toggle it using Ctrl+M, however. The same affects Gwenview from what I can tell. Other apps, like KWrite, just show their window menu bar again automatically.
Comment 9 Nate Graham 2017-10-25 13:29:29 UTC
Thanks for testing, Kai. So let's get another bug going for Gwenview and keep this bug to track Okular.
Comment 10 Albert Astals Cid 2017-10-25 19:17:13 UTC
If somehow we are to be using this for okular, someone move it over to okular not plasmashell?
Comment 11 Øystein Steffensen-Alværvik 2018-08-23 19:08:10 UTC
Still occurs with Okular. However, some applications don't show the menubar after even with 'Ctrl+M' when global menu has been disabled: Lokalize, Muon and Calligra. Their config files have the line 'MenuBar=Disabled'. 

Should I file bug reports for these apps individually or is it a global menu problem?
Comment 12 tildearrow 2020-12-02 01:10:47 UTC
Reproduced with Kdenlive, Ark and KDevelop.
Comment 13 Bernd Steinhauser 2023-03-15 18:08:33 UTC
There's many more.

I recently put the global menu in the title bar, just to try it out again.
Big mistake. Ever since, I have been fighting to get the menu bar back in so many apps.
Dolphin, ksudoku, konsole, just to name a few.
In some cases, Ctrl+m helps, in others it doesn't.
e.g. for ksudoku I couldn't find any way to get it back other than to edit the rc file.

I really would not recommend anybody to use the global menu unless they are 100% sure they will never want the menubar back.
Comment 14 Heimen Stoffels 2023-04-22 10:12:04 UTC
I too can reproduce this. In most cases, Ctrl+M or Show menu bar from the hamburger menu restores the bar. However, in Lokalize the menu bar is completely missing still and there's no way to restore it. Ctrl+M doesn't work, there's no hamburger menu, nothing.
Comment 15 Heimen Stoffels 2023-04-22 10:13:18 UTC
(In reply to Heimen Stoffels from comment #14)
> I too can reproduce this. In most cases, Ctrl+M or Show menu bar from the
> hamburger menu restores the bar. However, in Lokalize the menu bar is
> completely missing still and there's no way to restore it. Ctrl+M doesn't
> work, there's no hamburger menu, nothing.

Even if I edit lokalizerc and change MenuBar=Disabled to MenuBar=Enabled, it still doesn't show.