Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-110290

QWidget showNormal() not working when minimized on X11 and Wayland

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.2
    • GUI: Window management
    • None
    • Linux/Wayland, Linux/X11

    Description

      Reproducible testcase does not restore the window when minimized on Ubuntu X11 and Wayland. Works on Windows 10:

      from PySide6.QtWidgets import QApplication, QWidget
      from PySide6.QtCore import QTimer
      import sys
      
      def window_show_normal():
          print('Restoring window!')
      
          # Window not shown on Ubuntu X11 and Wayland, works on Windows 10
          # Window hide() followed by showNormal() is a workaround
          # window.hide()
      
          # Restore window should work on all desktops!
          window.showNormal()
      
      
      if __name__ == '__main__':
          app = QApplication(sys.argv)
      
          window = QWidget()
          window.resize(300, 200)
          window.setWindowTitle('Simple Window')
      
          # Minimize window
          window.showMinimized()
      
          # Restore window after 3 seconds
          QTimer.singleShot(3000, window_show_normal)
      
          sys.exit(app.exec())
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            erriez Erriez Ew
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes