Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.4
-
None
-
Win 10
Description
Bug:
- Strong and permanent flickering when draging frameless window between monitors with different dpis
Fixture
- two Monitors, one left, one right where you can move windows from one monitor to the other
- left monitor: normal dpi with 100% scaling
- right monitor: high dpi with 150% scaling
Used Application attributes
- AA_EnableHighDpiScaling
Application specs
- Frameless QMainWindow with central widget
- Central widgte has a close button and a drag label
- drag label uses event filter to move the windows around
- event filter reacts on Mouse press/move/release events
- event filter moves main window
Reproduction steps (move via event filter)
- build application (see attached source)
- Click and hold on Label ("Grab me and move me around") on the most right side
- drag window slowly on the left monitor
Result
- a strong flickering occurs while the window is permamently repositioned till it reachs the left monitor
- we get permamently errors from QWindowsWindow::setGeometry till the left monitor is reached
Variations
use QWidget instead of QMainWindow and move via event filter
- comment line 79 in Application.cpp
- uncomment line 80 in Application.cpp
- build
- Click and hold on Label ("Grab me and move me around") on the most right side
- drag window slowly on the left monitor
Result
- a strong flickering occurs while the window is permamently repositioned till it reachs the right monitor
- we get permamently errors from QWindowsWindow::setGeometry till the left monitor is reached
Disabled FramelessWindowHint and move via event filter
- comment line 77 in Application.cpp
- uncomment line 79 in Application.cpp
- comment line 80 in Application.cpp
- build
- Click and hold on Label ("Grab me and move me around") on the most right side
- drag window slowly on the left monitor
Result
- no flickering, but wrong position while transition from right to left monitor
- we get permamently error from QWindowsWindow::setGeometry till the left monitor is reached
Disable AA_EnableHighDpiScaling, Enabled or Disabled FramelessWindowHint and via event filter
- comment line 7 main.cpp
- un/comment line 77 in Application.cpp
- uncomment line 79 in Application.cpp
- comment line 80 in Application.cpp
- build
- Click and hold on Label ("Grab me and move me around") on the most right side
- drag window slowly on the left monitor
Result
- no flickering
- one error from QWindowsWindow::setGeometry
Move with Titlebar
- comment line 77 in Application.cpp
- uncomment line 79 in Application.cpp
- comment line 80 in Application.cpp
- build
- Click and hold on Titlebar on the most right side
- drag window slowly on the left monitor
Result
- correct positioning
- no errors
Attachments
Issue Links
- relates to
-
QTBUG-89646 Window move between mixed scale factor monitors on Windows doesn't work right
- Closed