Bug 500199 - Incorrect behavior of the menu bar in GTK 3 applications
Summary: Incorrect behavior of the menu bar in GTK 3 applications
Status: RESOLVED DUPLICATE of bug 490833
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.3.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2025-02-16 16:37 UTC by Alexey Ilyin
Modified: 2025-03-01 08:38 UTC (History)
8 users (show)

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


Attachments
Clicked on Help menu, File menu opens (97.50 KB, video/webm)
2025-02-19 14:38 UTC, rcerqueira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Ilyin 2025-02-16 16:37:17 UTC
When I click on any menu section in the menu bar, the first section opens instead of the one I clicked on

STEPS TO REPRODUCE
1. Open any GTK 3 application (e.g. GIMP 3.0 RC or Pinta (flatpak))
2. Click any but not first menu section

OBSERVED RESULT
The first menu section opens instead of the one you clicked on until you move the mouse over desired menu section.

EXPECTED RESULT
The menu section that you clicked on immediately opens.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10
Qt Version: 6.8.2
Session: Wayland
Comment 1 Buovjaga 2025-02-17 10:46:52 UTC
Confirmed. This was also reported to LibreOffice recently: https://bugs.documentfoundation.org/show_bug.cgi?id=165279

Reporter ran Fedora and I run Arch Linux.

Quick way to test is to run gtk3-demo and its example app and click the menu items.
Comment 2 Patrick Silva 2025-02-17 13:29:05 UTC
Can reproduce on Wayland, cannot on X11.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Graphics Platform: Wayland
Comment 3 cwo 2025-02-18 17:02:09 UTC
*** Bug 500264 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2025-02-18 21:49:33 UTC
I can confirm the issue, but it's a GTK bug. It happens with the default GTK 3 Adwaita theme too.
Comment 5 Patrick Silva 2025-02-18 21:55:44 UTC
I can reproduce on Arch running Plasma Wayland, but cannot on Arch running Gnome Wayland.
Comment 6 rcerqueira 2025-02-19 00:34:07 UTC
I also tested in Plasma 6.2 and the menus work as intended.
Comment 7 Buovjaga 2025-02-19 05:42:44 UTC
(In reply to rcerqueira from comment #6)
> I also tested in Plasma 6.2 and the menus work as intended.

Well, that's no reason to reopen, but would be good to find out what the GTK bug is...
Comment 8 Buovjaga 2025-02-19 07:35:13 UTC
Coincidentally, I noticed another change:

1. Launch GTK_THEME=Adwaita gtk3-demo
2. Select Spin Button and click Run

The button for decreasing a value is now "X" while it used to be a minus sign.
Comment 9 cwo 2025-02-19 13:35:50 UTC
(In reply to Buovjaga from comment #8)
> The button for decreasing a value is now "X" while it used to be a minus
> sign.

This should be fixed in newer versions of gtk.
Comment 10 Patrick Silva 2025-02-19 14:19:02 UTC
(In reply to cwo from comment #9)
> (In reply to Buovjaga from comment #8)
> > The button for decreasing a value is now "X" while it used to be a minus
> > sign.
> 
> This should be fixed in newer versions of gtk.

I use the latest gtk3 1:3.24.48-2 on Arch Linux and the bug persists.
Here is the bug report in Gnome bug tracker:
https://gitlab.gnome.org/GNOME/gtk/-/issues/7080
Comment 11 rcerqueira 2025-02-19 14:35:05 UTC
(In reply to Buovjaga from comment #7)
> (In reply to rcerqueira from comment #6)
> > I also tested in Plasma 6.2 and the menus work as intended.
> 
> Well, that's no reason to reopen, but would be good to find out what the GTK
> bug is...

Sorry... Let me better explain the bug:

Plasma 6.2.x: When I click on any menu section in the menu bar in any GTK3 app,  the one I clicked on opens correctly
Gnome: : When I click on any menu section in the menu bar in any GTK3 app,  the one I clicked on opens correctly
Plasma 6.3.0: : When I click on any menu section in the menu bar in any GTK3 app,  the first section opens instead of the one I clicked on

I have tested on Eclipse IDE and Gimp 3
Comment 12 rcerqueira 2025-02-19 14:38:55 UTC
Created attachment 178591 [details]
Clicked on Help menu, File menu opens
Comment 13 Buovjaga 2025-02-19 14:40:51 UTC
(In reply to rcerqueira from comment #11)
> (In reply to Buovjaga from comment #7)
> > (In reply to rcerqueira from comment #6)
> > > I also tested in Plasma 6.2 and the menus work as intended.
> > 
> > Well, that's no reason to reopen, but would be good to find out what the GTK
> > bug is...
> 
> Sorry... Let me better explain the bug:
> 
> Plasma 6.2.x: When I click on any menu section in the menu bar in any GTK3
> app,  the one I clicked on opens correctly
> Gnome: : When I click on any menu section in the menu bar in any GTK3 app, 
> the one I clicked on opens correctly
> Plasma 6.3.0: : When I click on any menu section in the menu bar in any GTK3
> app,  the first section opens instead of the one I clicked on
> 
> I have tested on Eclipse IDE and Gimp 3

The effects of the bug were already explained in comment 0. Now it's a question of finding out what bit of code in GTK is responsible for the issue. That said, maybe it can be a KDE bug after all.
Comment 14 rcerqueira 2025-02-19 14:56:34 UTC
(In reply to Buovjaga from comment #13)
> (In reply to rcerqueira from comment #11)
> > (In reply to Buovjaga from comment #7)
> > > (In reply to rcerqueira from comment #6)
> > > > I also tested in Plasma 6.2 and the menus work as intended.
> > > 
> > > Well, that's no reason to reopen, but would be good to find out what the GTK
> > > bug is...
> > 
> > Sorry... Let me better explain the bug:
> > 
> > Plasma 6.2.x: When I click on any menu section in the menu bar in any GTK3
> > app,  the one I clicked on opens correctly
> > Gnome: : When I click on any menu section in the menu bar in any GTK3 app, 
> > the one I clicked on opens correctly
> > Plasma 6.3.0: : When I click on any menu section in the menu bar in any GTK3
> > app,  the first section opens instead of the one I clicked on
> > 
> > I have tested on Eclipse IDE and Gimp 3
> 
> The effects of the bug were already explained in comment 0. Now it's a
> question of finding out what bit of code in GTK is responsible for the
> issue. That said, maybe it can be a KDE bug after all.

Sorry again... First time reporting a bug. Should this bug be reopened so?
Comment 15 Buovjaga 2025-02-19 15:17:57 UTC
(In reply to rcerqueira from comment #14)
> Sorry again... First time reporting a bug. Should this bug be reopened so?

Time will tell.
Comment 16 Nate Graham 2025-02-19 22:18:09 UTC
The only KDE component that could be to blame here is KWin, and only if the issue only happens on Wayland, not X11. It also can't be a regression in 6.3 because I've been encountering this for years. Does it happen for anyone on X11 as well, or only on Wayland?
Comment 17 Buovjaga 2025-02-20 06:05:59 UTC
(In reply to Nate Graham from comment #16)
> The only KDE component that could be to blame here is KWin, and only if the
> issue only happens on Wayland, not X11. It also can't be a regression in 6.3
> because I've been encountering this for years. Does it happen for anyone on
> X11 as well, or only on Wayland?

Tested with X11 session now and the issue is not seen. For me and (I assume) the others in this report, this is a regression in 6.3.
Comment 18 manrusin 2025-02-20 10:57:57 UTC
Bug is still here. First seen on plasma 6.3. On 6.2.5 (and 6.2.4) all works fine.

My specs:
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 19 rcerqueira 2025-02-20 20:54:43 UTC
Bug also does NOT happen in XWayland GTK3. Only happens in Plasma 6.3.0 with GTK3 in Wayland.
Comment 20 Nate Graham 2025-02-26 17:36:55 UTC
*** This bug has been marked as a duplicate of bug 490833 ***