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

Window move between mixed scale factor monitors on Windows doesn't work right

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.3
    • 5.15.2
    • GUI: High-DPI
    • Windows 10. At least two monitors at different scale factors.
    • Windows

    Description

      Programmatic moving of a window ( either with a setGeometry() or move() call ) between monitors of mixed scale factors does not work correctly.   As the window is moved between the monitors, it can jump around unpredictably until it is fully relocated to the other monitor.   This only happens when Qt::AA_EnableHighDpiScaling is set.

      This behavior does not happen if the window is moved using the windows title bar.

      Our application uses windows without title bars, so we have need to programmatically move it based on cursor location.  

      I've attached a sample Qt program that illustrates this behavior.  If you click and drag in the window, it will move the window starting from the upper left corner.   Try dragging this between two monitors at different scale factors (e.g. 100% and 150%) and observe the behavior.   Then try dragging the window using the title bar and observe the difference.

      Of note, there are lots and lots of "QWindowsWindow::setGeometry: Unable to set geometry...." messages as the erratic window behavior is happening, not sure if that's related or not.

      Here's a link to a video illustrating this behavior:   https://photos.app.goo.gl/MWo7hxjYo36hUZ8WA

      Attachments

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              jeremyhp Jeremy Cook
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes