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

[Windows] Finishing system move activates the window even if Qt.WindowDoesNotAcceptFocus is set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.3, 6.8.0
    • None
    • Windows

    Description

      Finishing system move activates the window even if Qt.WindowDoesNotAcceptFocus is set.

      Code sample:

      import QtQuick
      
      Window {
          id: window
          width: 200
          height: 200
          visible: true
      
          flags: Qt.WindowStaysOnTopHint | Qt.WindowDoesNotAcceptFocus
      
          DragHandler {
              target: null
              onActiveChanged: {
                  console.log("Drag active: " + active)
                  if (active)
                      window.startSystemMove()
              }
          }
      
          TapHandler {
              onTapped: {
                  console.log("Tapped")
              }
          }
      
          onActiveChanged: console.log("Window active: " + active)
      }
      

      Steps to reproduce:
      1. Launch the sample and make the window inactive (e.g. by clicking outside)
      2. Left-click inside this window and make sure that the window is still inactive (since Qt.WindowDoesNotAcceptFocus flag is set)
      3. Move the window by dragging its content area (i.e, via startSystemMove())
      4. Observe the window state

      Actual result: The window became active.
      Expected result: The window stays inactive, i.e. the same result as when clicking inside.
       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-131714
          # Subject Branch Project Status CR V

          Activity

            People

              vestbo Tor Arne Vestbø
              studiosus Vladimir Belyavsky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change