[Bug] Mouse position doesn't work properly with Wayland dual monitors

I am using two monitors and I just switched from KDE X11 to KDE Wayland. Everything works fine on X11 or XWayland (QT_QPA_PLATFORM=xcb or WAYLAND_DISPLAY=''). Anki’s menus on Wayland don’t appear where the mouse is. Whenever I open or close a window on the second monitor, none of the buttons respond to clicks or hovers.

Menus are wrongly positioned on the left monitor out of 2.

1

Menus are fine on the left monitor when the right monitor is disabled.

2

Menus and buttons are broken on the right monitor out of 2.

3

This is like the opposite of forums (dot) ankiweb (dot) net /t/bug-menu-crosses-screens-on-sway-wayland/17116 . I don’t care if the menus cross a monitor, I just want them under my mouse.

I’m using KDE 5.26 backports-landing PPA on Ubuntu 22.10 with Qt 5.15.6 and fcitx. Anki is installed in venv allowing system Qt.

pip freeze
anki==2.1.54
apt-xapian-index==0.49
aqt==2.1.54
attrs==22.1.0
beautifulsoup4==4.11.1
blinker==1.4
certifi==2022.6.15
chardet==4.0.0
charset-normalizer==2.1.0
click==8.0.3
colorama==0.4.5
cryptography==3.4.8
cupshelpers==1.0
cycler==0.11.0
dbus-python==1.2.18
decorator==5.1.1
defer==1.0.6
distlib==0.3.5
distro==1.7.0
distro-info==1.1+ubuntu1
filelock==3.7.1
Flask==2.2.2
Flask-Cors==3.0.10
fonttools==4.34.4
httplib2==0.20.4
idna==3.3
importlib-metadata==4.6.4
itsdangerous==2.1.2
jeepney==0.8.0
Jinja2==3.1.2
jsonschema==4.9.1
keyring==23.8.2
kiwisolver==1.4.4
language-selector==0.1
launchpadlib==1.10.16
lazr.restfulclient==0.14.4
lazr.uri==1.0.6
Markdown==3.4.1
MarkupSafe==2.1.1
matplotlib==3.5.3
meson==0.63.2
more-itertools==8.10.0
netifaces==0.11.0
numpy==1.23.1
oauthlib==3.2.0
onboard==1.4.1
orjson==3.7.11
packaging==21.3
Pillow==9.2.0
platformdirs==2.5.2
protobuf==4.21.5
PyAudio==0.2.11
pycairo==1.20.1
pycups==2.0.1
PyGObject==3.42.2
PyJWT==2.4.0
pyparsing==3.0.7
PyQt5==5.15.7
PyQt5-sip==12.11.0
PyQtWebEngine==5.15.6
pyrsistent==0.18.1
PySocks==1.7.1
python-apt==2.3.0+ubuntu2.1
python-dateutil==2.8.1
python-debian==0.1.46
PyYAML==5.4.1
requests==2.28.1
SecretStorage==3.3.3
Send2Trash==1.8.0
six==1.16.0
soupsieve==2.3.2.post1
ubuntu-advantage-tools==27.11.2
ubuntu-drivers-common==0.0.0
ufw==0.36.1
urllib3==1.26.11
vboxapi==1.0
virtualenv==20.16.3+ds
wadllib==1.3.6
waitress==2.1.2
Werkzeug==2.2.2
xkit==0.0.0
zipp==1.0.0

Can you reproduce the problem with Qt 6.4?

How is the scale of these monitors? 100%?