Set per-monitor DPI awareness explicitly and verify picks on mixed-DPI desktops
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
- 领域
- accessibility, desktop
调研方向
Start with the entry point that defines main(), autoclicker/gui/picker.py, and click_engine.py; inspect WindowsAutoclicker.spec and the DPI notes in docs/ARCHITECTURE.md and docs/PERFORMANCE.md. Verify the awareness call runs before Tk and PyAutoGUI load, then use the proposed unit test and manually check picked clicks on both monitors of a mixed-DPI Windows desktop. Done means per-monitor awareness is documented and each click lands on its picked pixel.
由索引模型根据 Issue 内容生成。
描述
Why it matters
Picking and clicking only line up if the picker (Tk) and the clicker (PyAutoGUI / Win32) agree on what a pixel is. Today the process's DPI awareness is set implicitly, as a side effect of importing PyAutoGUI, and only to system awareness. On the setups where coordinate bugs actually happen (a 4K laptop at 150% next to a 1080p monitor at 100%), Windows virtualizes coordinates per monitor for system-aware apps. The result may be fine, slightly off, or a blurry overlay on one screen, and nothing in the repo verifies which.
Evidence
pyautogui/_pyautogui_win.pycallsctypes.windll.user32.SetProcessDPIAware()at import (system-aware, not per-monitor).- No
SetProcessDpiAwarenessContextcall and no manifest entry inWindowsAutoclicker.spec; nothing inautoclicker/mentions DPI. autoclicker/gui/picker.pysizes the overlay fromGetSystemMetrics(SM_*VIRTUALSCREEN)and reportsevent.x_root/y_root;click_engine.pymoves withpyautogui.moveTo. Correctness on mixed-DPI desktops depends on both sides being virtualized identically.docs/PERFORMANCE.mdanddocs/ARCHITECTURE.mdalready list "multi-monitor DPI risk" as a reason to defer aSendInputpath.
Suggested approach
- Set awareness explicitly and first thing in
main()(before Tk and PyAutoGUI load):SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)with fallbacks toSetProcessDpiAwareness(2)andSetProcessDPIAware(). Optionally also embed it in the exe manifest. - Manually verify on a mixed-DPI two-monitor setup: pick a point on each monitor, run, and confirm the click lands on the picked pixel. Record the result in
docs/ARCHITECTURE.md. - Add a unit test that
main()calls the awareness setter before creating the app.
Done when
- DPI awareness is explicit, per-monitor v2 where available, and documented.
- Picks on every monitor of a mixed-DPI desktop click the exact picked pixel (verified once manually and noted in docs).
- 主要语言
- Python
- 星标
- 0
- 派生
- 2
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/autoclicker 的其他 Issue
-
maintenance priority: low
难度 3/5 半天 新手友好度 56/100
TMHSDigital/autoclicker#202 ·
维护者通常 3 天内回复
-
bug priority: low
难度 3/5 1-2 天 新手友好度 52/100
TMHSDigital/autoclicker#201 ·
维护者通常 3 天内回复
-
dependencies maintenance priority: medium
难度 5/5 一周以上 新手友好度 35/100
TMHSDigital/autoclicker#154 · 1 条评论 ·
维护者通常 3 天内回复
-
marketing packaging priority: low
难度 4/5 3-5 天 新手友好度 38/100
TMHSDigital/autoclicker#118 · 1 条评论 ·
维护者通常 3 天内回复
-
documentation marketing priority: medium
难度 3/5 1-2 天 新手友好度 55/100
TMHSDigital/autoclicker#117 · 1 条评论 ·
维护者通常 3 天内回复
查看 TMHSDigital/autoclicker 的全部 Issue
相似的 Issue
-
hive size:simple
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)未关闭
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 70/100
painted-porch/marcus#977 ·
维护者通常 1 天内回复
-
llm translation
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
FAIRmat-NFDI/sand#239 ·
维护者通常 1 天内回复