Bug 484469 - kde-gtk-config daemon makes all GTK applications have their in-window menus disappear on click
Summary: kde-gtk-config daemon makes all GTK applications have their in-window menus d...
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_style (show other bugs)
Version: 6.0.5
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 20:16 UTC by Julien Delquié
Modified: 2024-08-21 19:58 UTC (History)
8 users (show)

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


Attachments
Demo of the issue (581.62 KB, video/webm)
2024-03-25 20:16 UTC, Julien Delquié
Details
diff of .gtkrc-2.0 (476 bytes, patch)
2024-08-06 17:33 UTC, Julien Delquié
Details
Diff of .config/gtk-2.0/gtkfilechooser.ini (302 bytes, patch)
2024-08-06 17:34 UTC, Julien Delquié
Details
Diff of .config/gtk-3.0/settings.ini (583 bytes, patch)
2024-08-06 17:34 UTC, Julien Delquié
Details
Diff of .config/gtk-4.0/settings.ini (336 bytes, patch)
2024-08-06 17:35 UTC, Julien Delquié
Details
Diff of .config/gtkrc (232 bytes, patch)
2024-08-06 17:35 UTC, Julien Delquié
Details
Diff of .config/gtkrc-2.0 (303 bytes, patch)
2024-08-06 17:36 UTC, Julien Delquié
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Delquié 2024-03-25 20:16:23 UTC
Created attachment 167755 [details]
Demo of the issue

SUMMARY
GTK applications menu disappear when clicking an item.
I use wayland, and if launch application from Konsole with GDK_BACKEND=x11, the menu does not disappear.

STEPS TO REPRODUCE
1. launch a GTK application
2. click on menu item

OBSERVED RESULT
Menu disappear.


EXPECTED RESULT
Menu still there and usable.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-gentoo-x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 31.3 Gio of RAM
Graphics Processor: AMD Radeon RX 7800 XT

ADDITIONAL INFORMATION
a video of the issue is available in attachment.
Comment 1 Julien Delquié 2024-07-07 05:43:32 UTC
I wonder if this bug is not linked to this one: https://bugs.kde.org/show_bug.cgi?id=424485
Comment 2 ray 2024-07-18 21:16:24 UTC
i think this is new window problem and it is a problem from loooong time and i think it's time to repair it.

Application like Gimp, Audacity

When You open Gimp there is normal menu in global menu widget and all thing working fine until you open new window in that program then menu is gone. Only way to get back is click somewhere besides gimp and click gimp window again.

More clear explanation:

Open gimp, open image or make new empty, use from mneu for example colors -> levels (or any other tool that open new window) window will open click ok then menu gone. Same audacity or some other apps i dont rememeber.
Comment 3 Nate Graham 2024-07-27 03:43:30 UTC
I cannot reproduce this issue.

Can you reproduce it in a new clean user account with no customization?
Comment 4 Julien Delquié 2024-07-27 14:25:22 UTC
(In reply to Nate Graham from comment #3)
> I cannot reproduce this issue.
> 
> Can you reproduce it in a new clean user account with no customization?

Oh, interesting, I can’t reproduce with a new account!
I can try a diff between the two account configuration.
Can you tell me what configuration files are relevant?
Comment 5 Nate Graham 2024-07-29 18:50:59 UTC
Anything in ~/.gtkrc-2.0 and ~/.config/gtk*, for starters.
Comment 6 Julien Delquié 2024-08-06 17:33:36 UTC
Created attachment 172347 [details]
diff of .gtkrc-2.0
Comment 7 Julien Delquié 2024-08-06 17:34:18 UTC
Created attachment 172348 [details]
Diff of .config/gtk-2.0/gtkfilechooser.ini
Comment 8 Julien Delquié 2024-08-06 17:34:58 UTC
Created attachment 172349 [details]
Diff of .config/gtk-3.0/settings.ini
Comment 9 Julien Delquié 2024-08-06 17:35:30 UTC
Created attachment 172350 [details]
Diff of .config/gtk-4.0/settings.ini
Comment 10 Julien Delquié 2024-08-06 17:35:56 UTC
Created attachment 172351 [details]
Diff of .config/gtkrc
Comment 11 Julien Delquié 2024-08-06 17:36:32 UTC
Created attachment 172352 [details]
Diff of .config/gtkrc-2.0
Comment 12 Julien Delquié 2024-08-06 17:37:57 UTC
Sorry for all the attachment.

I made a diff of each gtk* files that could be interesting.
Loup is my user.
Larry is the user I created to have a clean session to compare to.
Comment 13 Nate Graham 2024-08-06 19:34:31 UTC
The lack of appmenu-gtk-module in your clean user account has a high likelihood of being relevant. I gather you're not using a global menu in the new user account, but you do use it in your normal user account? Is that accurate?
Comment 14 Julien Delquié 2024-08-08 04:48:57 UTC
For the new user account (Larry): I just created it, then login, and do absolutely nothing else, just to be sure. So, yes, you’re right, this user (Larry) does not use a global menu.

For my normal user account (Loup): I do not use a global menu. But, now I think about it, it’s possible that one day, a long time ago, I gave it a try, just to see what was this feature. Then I deactivated it (I don’t remember the steps for activation/deactivation I used in the past). What I am not sure about is: did I deactivated it for sure, in the right way, or did I left something that could lead to my issue?… I am not able to answer this question. :s
Comment 15 Nate Graham 2024-08-09 20:54:48 UTC
It's quite possible. In your normal user account, perhaps it's hidden somewhere in the containment of a disconnected screen? Can you look through ~/.config/plasma-org.kde.plasma.desktop-appletsrc for the text "global menu" or "globalmenu" or maybe even just "global" to see if you have one of those in there? If you do, don't remove it, just let me know.
Comment 16 Julien Delquié 2024-08-11 06:02:56 UTC
The only things I see in my normal user account about « global » in « .config/plasma-org.kde.plasma.desktop-appletsrc » are:
[Containments][2][Applets][3][Configuration][Shortcuts]
global=Alt+F1

[Containments][2][Applets][3][Shortcuts]
global=Alt+Esc

[Containments][81][Applets][82][Configuration][Shortcuts]
global=Alt+F1

[Containments][81][Applets][82][Shortcuts]
global=Alt+F1

And If I understand correctly this file, Applet 3 from Containment 2 is just Kickoff, same for Applet 82 from Containment 81 (one for each panel I have, one per screen):

[Containments][2][Applets][3]
immutability=1
plugin=org.kde.plasma.kickoff

Containments][81][Applets][82]
immutability=1
plugin=org.kde.plasma.kickoff
Comment 17 Nate Graham 2024-08-13 21:47:55 UTC
All right, no global menu hiding somewhere, so there goes that theory. So somehow the appmenu-gtk-module module is loaded despite not having a global menu. Which makes some sense. If you remove the mention of that GTK module from your GTK settings files and then reboot, does the problem go away?
Comment 18 Julien Delquié 2024-08-14 04:16:50 UTC
(In reply to Nate Graham from comment #17)
> All right, no global menu hiding somewhere, so there goes that theory. So
> somehow the appmenu-gtk-module module is loaded despite not having a global
> menu. Which makes some sense. If you remove the mention of that GTK module
> from your GTK settings files and then reboot, does the problem go away?

Ok, I performed many interesting tests.

Removing any appmenu-gtk-module references from each files and removing gtk-shell-shows-menubar=1.
Before reboot: success, menu does not disappear from virt-manager (for example)
After reboot: success, menu does not disappear from virt-manager (for example)
But, just to be sure I opened again systemsettings and tested with gtk3_preview app seems ok (If I recall correctly).
After a new reboot: failure, menu disappers from virt-manager (for example) and gtk3_preview app…! :'(

Any modification I performed on files were back again. My assumption is that systemsettings put these settings again in those files, but I don’t know why.
Comment 19 Nate Graham 2024-08-14 22:02:45 UTC
Ok, I have a theory: it's kde-gtk-config. Can you enter `kcmshell6 kded` in a terminal window, uncheck "GNOME/GTK settings synchronization service", remove the line from the files, reboot, and then try again? If I'm right, the offending line will not be re-added to the files.
Comment 20 Julien Delquié 2024-08-15 04:50:57 UTC
(In reply to Nate Graham from comment #19)
> Ok, I have a theory: it's kde-gtk-config. Can you enter `kcmshell6 kded` in
> a terminal window, uncheck "GNOME/GTK settings synchronization service",
> remove the line from the files, reboot, and then try again? If I'm right,
> the offending line will not be re-added to the files.

And it works! The only problem now is that I cannot change my GNOME/GTK settings in systemsettings where I could do it before. Seems linked to unchecked service.
Comment 21 Nate Graham 2024-08-21 15:41:54 UTC
Ok, thanks!