Commit d4280dd
committed
fix(dock-engine): improve window activation to target the correct window
Old logic matched only by X coordinate with 3px tolerance, which fails
for multi-window apps like IntelliJ IDEA where windows have distinct
titles but may share similar X positions.
New two-pass matching strategy:
- Pass 1: exact AX title match against the CGWindowName of the target
window (covers IDEA project windows, Chrome tabs, etc.)
- Pass 2: position match using both X and Y within 8pt tolerance as
fallback for untitled or same-title windows
Also resolve the owning PID from CGWindowInfo so that multi-process
apps activate the correct process instance.1 parent ab03e63 commit d4280dd
1 file changed
Lines changed: 38 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
89 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
90 | 99 | | |
91 | | - | |
92 | 100 | | |
93 | | - | |
94 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
95 | 111 | | |
96 | 112 | | |
97 | 113 | | |
98 | 114 | | |
99 | 115 | | |
100 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
101 | 129 | | |
102 | 130 | | |
103 | | - | |
| 131 | + | |
| 132 | + | |
104 | 133 | | |
105 | | - | |
| 134 | + | |
106 | 135 | | |
107 | 136 | | |
108 | 137 | | |
| |||
0 commit comments