python: 3.13
pywebview: 6.1
platform: Windows 11
I noticed an inconsistency when setting and reading the window position on Windows with display scaling enabled.
- When setting the window position, the display scale factor appears to be taken into account.
- When reading the window position, the returned coordinates appear to be in physical pixels.
This makes the reported window coordinates inconsistent and difficult to use reliably.
Steps to reproduce:
- Use the example from: https://pywebview.flowrl.com/examples/move_window.html
- Add an extra print statement to log new_x and new_y.
- Run the example on a Windows 11 system with display scaling enabled.
This is the output I get:
Window coordinates are (375, 375)
Window dimensions are (996x738)
Primary screen: 2560x1440
new_x, new_y: (1464, 602)
Window coordinates are now (1830, 752)
This is my display setting

python: 3.13
pywebview: 6.1
platform: Windows 11
I noticed an inconsistency when setting and reading the window position on Windows with display scaling enabled.
This makes the reported window coordinates inconsistent and difficult to use reliably.
Steps to reproduce:
This is the output I get:
This is my display setting