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 天內回覆