Can't return right win ID on wayland
Unsolved
Qt for Python
-
This is my test code:
from PySide6.QtCore import * from PySide6.QtGui import * from PySide6.QtWidgets import * import sys app = QApplication(sys.argv) window = QMainWindow() window.show() print("Your winID: {}".format(window.winId())) app.exec()
If I run it on X11, it can return the right number. But if I run it on Wayland, it just returns 1.
❯ python ./winID_test.py Your winID: 1
My system information:
❯ neofetch _,met$$$$$gg. tim@tim-debian ,g$$$$$$$$$$$$$$$P. -------------- ,g$$P" """Y$$.". OS: Debian GNU/Linux 12 (bookworm) x86_64 ,$$P' `$$$. Host: Code01 Ver2.0 1 ',$$P ,ggs. `$$b: Kernel: 6.1.0-9-amd64 `d$$' ,$P"' . $$$ Uptime: 58 mins $$P d$' , $$P Packages: 2756 (dpkg), 1 (flatpak) $$: $$. - ,d$$' Shell: bash 5.2.15 $$; Y$b._ _,d$P' Resolution: 2560x1600 Y$$. `.`"Y$$$$P"' DE: Plasma 5.27.5 `$$b "-.__ WM: kwin `Y$$ Theme: NephriteLight [Plasma], Breeze [GTK2/3] `Y$$. Icons: [Plasma], Colloid [GTK2/3] `$$b. Terminal: konsole `Y$$b. CPU: AMD Ryzen 7 6800H with Radeon Graphics (16) @ 3.200GHz `"Y$b._ GPU: AMD ATI Radeon 680M `""" Memory: 7058MiB / 30804MiB
-
I found a bug report talks about this problem
https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-76983