-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken multi-level popup menu in Wayland after upgrading to Qt 6.5.1 #26407
Comments
And from the console output, this message shows when the sub-popup is triggered:
This both shows in versions with ( |
I'm not sure what you expected from tdesktop to do given that you know it's a Qt issue. It's probably should reported to Qt. |
I can't reproduce this using official binary on Plasma Wayland |
I'm not familiar with the codebase of telegram-desktop and Qt, and then I could not give a minimal reproducible example if I would report this to Qt upstream. |
Well, I can't either especially given that I can't reproduce. The best I can do is add this issue to #25126 but this experiment seem to fail, no one looks at the issue and helps with writing reproducers and the issues requiring reproducers are still stuck. |
Does it help if it is reproducible inside a nested wayland compositor instance? You don't need to install a whole large desktop environment in this case. This could let it run inside:
|
I remember I had a problem launching mutter nested last time, it did just crash IIRC |
Anyway, as long as this issue is tdesktop-specific, I won't be able to write a reproducer as tdesktop UI widgets are non-trivial and I don't know them good enough to localize the bugged place. You should check the issue on other Qt 6 apps, if it happens, then you can report and say to reproduce with any Qt application/example providing the menu, if not, then we're out of luck and this is going to be a long-standing issue. |
I reproduced with Weston, btw |
|
Looks like what has happened is order of some requests has changed in 6.5.1 and now the callback for the sync primitive is called earlier, after surface destruction but before focus change events. As the window no more exists and the focus hasn't changed yet, Qt thinks there's no focused window and the application is inactive so it closes all the opened popups recursively. Qt 6.5.0:
the request is Qt 6.5.1:
The request is This should probably be reported to Qt but given that this is not reproducible with other Qt applications (right? I haven't checked, I don't have any other application using 6.5.1 right now), this is specific to tdesktop's custom popups and so they should be ported to a minimum reproducible example required by the Qt reporting guidelines. Personally I'm not ready to do that work, so this is apparently stuck |
Could this issue also be related to some other librarys? I looked around in my installed Qt applications (not much on a Gtk+ Desktop) and quickly found something that could be related: Native menubars work correctly when moving (in a straight line) over the tabs RTL, but LTR movement does not work. The drop-down does not switch to the next tab. |
I know that there's another bug in GNOME 44.1 that affects Qt programs in Xwayland: https://gitlab.gnome.org/GNOME/mutter/-/issues/2820. But I don't think that it is related to this issue. |
Yeah, I heard that menus on Xwayland are broken too (was arguing with a friend that it is yet another GNOME's regression rather than a Qt one, now I have a link, thanks) and, yeah, I don't think it's related. But that makes @NA0341's test questionable (whether he has tested with Xwayland Qt applications or with native Wayland Qt applications). |
I've implemented a workaround, it should be fine in the latest 4.8.5 version. |
Steps to reproduce
Flathub
org.telegram.desktop
9e5fbec1a065f8a7475d5634aa2a67b176535303fa44a7379504d5893617370f
is the latest version that does not have this bug. Also,telegram-desktop
distributed by Arch also has this issue, thus it looks possibly a regression in Qt 6.5.1.Screen record in flathub
81b809fd4902584f0cc9cab6173cba220d1b51e11c1307b61b5fa58c6a85c8c2
(4.8.1), with nested weston:Kooha-2023-06-14-17-43-18.mp4
Expected behaviour
The menu still stays in screen.
Actual behaviour
The menu is closed unexpectedly.
Operating system
Arch Linux, GNOME 44.2 Wayland. This can also be reproduced in nested Weston 12.0.1.
Version of Telegram Desktop
4.8.3 and 4.8.1 (after desktop-app/patches@1d72fdb)
Installation source
Flatpak
Crash ID
N/A
Logs
The text was updated successfully, but these errors were encountered: