Bug 481933 - Menus somtimes appear as normal windows when activated from anything other than the current active window
Summary: Menus somtimes appear as normal windows when activated from anything other th...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.0
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, wayland
: 482185 483924 484334 485683 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-28 14:30 UTC by Unused Account
Modified: 2024-07-20 16:19 UTC (History)
14 users (show)

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


Attachments
Plasma Shell menu opens as a window (2.64 MB, image/png)
2024-03-12 16:39 UTC, Unused Account
Details
My system details (104.15 KB, image/png)
2024-03-12 18:21 UTC, jonathansimon
Details
LibreOffice menus sometimes show as separate windows (1.53 MB, video/webm)
2024-03-15 16:22 UTC, fin-w
Details
screenshot taken on Arch Linux running Qt 6.7.2 (1.24 MB, image/png)
2024-07-20 15:56 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unused Account 2024-02-28 14:30:41 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

When another application is focused, clicking the menu in a different app may cause it to appear as a window instead of a menu. This occurs when any application is focused and I right-click on the Plasma panel (Plasma 6.0, Wayland session). It also occurs in Qt 5 apps, but not GTK apps.

STEPS TO REPRODUCE
1.  Have any window active and right click the Plasma panel
2.  Have another window active and click on a menu in a Qt 5 app (e.g. LibreOffice using the KF5 interface plugin, as is default on Fedora KDE)
3.  Have another window active and click on a menu in a Qt 6, GTK 3, or GTK 4 app

OBSERVED RESULT
The Plasma 6 panel and Qt 5 app window will open as a window, instead of a menu. The GTK apps will open their menu as normal.

EXPECTED RESULT
All menus should appear as menus, not as windows

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.0-0.rc5.41.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS MASTER
System Version: -CF

ADDITIONAL INFORMATION
Comment 1 Zamundaaa 2024-02-28 15:28:19 UTC
It happening with Qt 5 apps is a Qt bug. I can't reproduce it happening with plasmashell though
Comment 2 Nate Graham 2024-02-29 21:02:27 UTC
Also can't reproduce with plasmashell. As Xaver says, in Qt5 apps it's unfortunately a Qt bug.
Comment 3 Unused Account 2024-03-12 16:38:17 UTC
Reopening this time with a screenshot of it happening from Plasma Shell for proof :) this happened after a few suspend-wake cycles so maybe it has something to do with that?
Comment 4 Unused Account 2024-03-12 16:39:07 UTC
Created attachment 167050 [details]
Plasma Shell menu opens as a window
Comment 5 jonathansimon 2024-03-12 18:20:27 UTC
This is happening for me as well. An added detail is that, when it happens, the two task bars on my two panels (one per monitor) start showing all windows instead of just those from their respective screens. I don't know if the two issues have the same cause but they always happen together.
Comment 6 jonathansimon 2024-03-12 18:21:37 UTC
Created attachment 167054 [details]
My system details
Comment 7 fin-w 2024-03-15 16:22:18 UTC
Created attachment 167272 [details]
LibreOffice menus sometimes show as separate windows

INSTALLED:
libreoffice-fresh 24.2.1-3
plasma5-integration 6.0.2-3
xdg-desktop-portal 1.18.2-1
xdg-desktop-portal-kde 6.0.2-3
xdg-user-dirs 0.18-1
xdg-utils 1.2.1-1

DETAILS:
Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-2520M CPU @ 2.50GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 3000
Comment 8 Unused Account 2024-03-16 14:05:55 UTC
(In reply to fin-w from comment #7)
> Created attachment 167272 [details]
> LibreOffice menus sometimes show as separate windows

Go to Help -> About, look at "User Interface". If it says KF5, then that's caused by the upstream Qt 5 bug. 

I don't know if Arch packages libreoffice-kf6 (the Qt 6 UI), but it was just recently packaged for Fedora 40, so now LibreOffice uses KF6 (thus Qt 6) by default, which shouldn't have this problem (but Plasma 6's panels do, for some reason...)
Comment 10 fin-w 2024-03-16 19:30:33 UTC
Updating LibreOffice seems to have fixed my issue. Thanks!
Comment 11 Zamundaaa 2024-04-09 14:00:55 UTC
*** Bug 483924 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2024-05-16 22:28:53 UTC
I can reproduce what I'm pretty sure is the same issue in the following way:

1. Open Konsole
2. Type the text "green"
3. Focus another window
4. Hover over the word "green"
Comment 13 Nate Graham 2024-05-16 22:29:36 UTC
*** Bug 482185 has been marked as a duplicate of this bug. ***
Comment 14 Sjoerd 2024-05-17 10:44:38 UTC
(In reply to Nate Graham from comment #12)
> I can reproduce what I'm pretty sure is the same issue in the following way:
> 
> 1. Open Konsole
> 2. Type the text "green"
> 3. Focus another window
> 4. Hover over the word "green"

I can reproduce it in this way as well. 

The wierd thing is, it only happens with the plasma panel after a while (maybe in combination with suspends as been said before in bug #482185). So since I just rebooted, I can't reproduce it right now with the panel in the usal way (focus on another window and right click the plasma panel), but I can reproduce it in your way.
Comment 15 Nate Graham 2024-05-20 14:11:39 UTC
This appears to be an upstream Qt issue. It'll be fixed by https://codereview.qt-project.org/c/qt/qtwayland/+/562273. Will updated this ticket with the Qt version that ends up with the fix.
Comment 16 Nate Graham 2024-05-24 14:25:40 UTC
That got merged; will be fixed in Qt 6.7.2.
Comment 17 Vlad Zahorodnii 2024-05-31 11:37:00 UTC
*** Bug 485683 has been marked as a duplicate of this bug. ***
Comment 18 Vlad Zahorodnii 2024-05-31 11:39:05 UTC
*** Bug 484334 has been marked as a duplicate of this bug. ***
Comment 19 Eugene Shalygin 2024-06-13 15:21:43 UTC
(In reply to Nate Graham from comment #15)
> This appears to be an upstream Qt issue. It'll be fixed by
> https://codereview.qt-project.org/c/qt/qtwayland/+/562273. Will updated this
> ticket with the Qt version that ends up with the fix.

I applied this patch to Qt 6.7.1 but QtC popups are still drawn as normal windows.
Comment 20 Nate Graham 2024-06-13 15:56:12 UTC
Darn. It's possible there were other components that are only in Qt 6.7.2. Let's wait for that to be released, and if that doesn't fix it, then we'll re-open this. Thanks for checking!
Comment 21 Vlad Zahorodnii 2024-06-14 09:16:59 UTC
(In reply to Nate Graham from comment #20)
> Darn. It's possible there were other components that are only in Qt 6.7.2.
> Let's wait for that to be released, and if that doesn't fix it, then we'll
> re-open this. Thanks for checking!

Please file an upstream ticket instead. It's not a kwin issue.
Comment 22 Patrick Silva 2024-07-20 15:56:13 UTC
Created attachment 171827 [details]
screenshot taken on Arch Linux running Qt 6.7.2

It's still reproducible on my Arch Linux running Qt 6.7.2.

1. have a folder containing some file on desktop
2. hover over the folder on desktop and click on the arrow in the upper left corner - a popup opens
3. drag the file from the popup and drop it on desktop

Result: context menu with window decoration seen in the screenshot attached to this comment
Comment 23 Eugene Shalygin 2024-07-20 16:19:07 UTC
It's not only a visual glitch, but if user is typing fast enough for popups to update, Qt crashes (QTBUG-126660).