Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Can't return right win ID on wayland
Forum Updated to NodeBB v4.3 + New Features

Can't return right win ID on wayland

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 450 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tim Tu
    wrote on last edited by
    #1

    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 
    
    JonBJ 1 Reply Last reply
    0
    • T Tim Tu

      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 
      
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Tim-Tu
      Then, I know this may not be nice to hear, but I wonder whether this works at all under Wayland? Don't know whether anybody has tested that.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tim Tu
        wrote on last edited by
        #3

        I found a bug report talks about this problem
        https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-76983

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved