Set per-monitor DPI awareness explicitly and verify picks on mixed-DPI desktops
Les mainteneurs répondent en général sous 3 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- python
- Domaine
- accessibility, desktop
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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).
- Langage dominant
- Python
- Étoiles
- 0
- Forks
- 2
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 2
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TMHSDigital/autoclicker
-
maintenance priority: low
Difficulté 3/5 Une demi-journée Accessibilité débutants 56/100
TMHSDigital/autoclicker#202 ·
Les mainteneurs répondent en général sous 3 jours
-
bug priority: low
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
TMHSDigital/autoclicker#201 ·
Les mainteneurs répondent en général sous 3 jours
-
dependencies maintenance priority: medium
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
TMHSDigital/autoclicker#154 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
marketing packaging priority: low
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
TMHSDigital/autoclicker#118 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
documentation marketing priority: medium
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
TMHSDigital/autoclicker#117 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de TMHSDigital/autoclicker
Issues similaires
-
hive size:simple
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
painted-porch/marcus#977 ·
Les mainteneurs répondent en général sous 1 jour
-
llm translation
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
FAIRmat-NFDI/sand#239 ·
Les mainteneurs répondent en général sous 1 jour