Skip to content

When the screen definition is not 100%, the window position set by SetRelativePosition is incorrect #4300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zhangjing007 opened this issue May 22, 2025 · 3 comments
Labels
awaiting feedback More information is required from the requestor Bug Something isn't working

Comments

@zhangjing007
Copy link

zhangjing007 commented May 22, 2025

Description

When the resolution of the Windows computer is set to 125% or other non-100% values, the position of the window is set through SetRelativePosition, which is always incorrect

To Reproduce

  1. In the settings of the Windows system, find Screen - > Zoom & Layout - > Zoom, and then modify it to 125%.
  2. Set a non- (0,0) coordinate as the position of the window in the wails3 program, and you will find that the position is wrong. And the closer the set coordinate value is to the lower right corner, the greater the deviation.

Expected behaviour

  1. In the settings of the Windows system, find Screen - > Zoom & Layout - > Zoom, and then modify it to 125%.
  2. Set a non- (0,0) coordinate as the position of the window in the wails3 program, and you will find that the position is wrong. And the closer the set coordinate value is to the lower right corner, the greater the deviation.

Screenshots

Image

Image

Attempted Fixes

No response

System Details

设备名称	zj-huawei-pc
处理器	Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz   2.30 GHz
机带 RAM	16.0 GB (15.8 GB 可用)
设备 ID	3708677D-C5F1-4CAD-BCF5-F22682A5E61C
产品 ID	00329-10330-00000-AA700
系统类型	64 位操作系统, 基于 x64 的处理器
笔和触控	为 10 触摸点提供触控支持

Additional context

No response

@zhangjing007 zhangjing007 added the Bug Something isn't working label May 22, 2025
Copy link
Contributor

👋 Thanks for reporting this issue! To help us investigate, could you please:

  1. Add the output of wails doctor if not already included
  2. Provide clear steps to reproduce the issue
  3. If possible, create a minimal reproduction of the issue

This will help us resolve your issue much faster. Thank you!

@github-actions github-actions bot added the awaiting feedback More information is required from the requestor label May 22, 2025
@zhangjing007
Copy link
Author

zhangjing007 commented May 22, 2025

1、a minimal reproduction of the issue
https://github.com/zhangjing007/wails3_bug

2、wails doctor:

Image

@zhangjing007
Copy link
Author

👋 Thanks for reporting this issue! To help us investigate, could you please:

  1. Add the output of wails doctor if not already included
  2. Provide clear steps to reproduce the issue
  3. If possible, create a minimal reproduction of the issue

This will help us resolve your issue much faster. Thank you!

1、a minimal reproduction of the issue
https://github.com/zhangjing007/wails3_bug

2、wails doctor:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback More information is required from the requestor Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant