Commit e6e4809
authored
Patch GLFW to improve macOS monitor name detection (#2398)
This patch fixes #2384 by porting some of the Cocoa monitor name handling changes from GLFW release 3.4 to the copy of GLFW in the Graph Editor source tree. Specifically, it uses `NSScreen` APIs where possible, instead of older IOKit APIs that do not work with AirPlay connected displays or on Apple Silicon.
I chose to only bring over the essential changes from GLFW 3.4, since a full update to 3.4 is much more extensive, harder to review, and probably not merited for such small benefit. Nonetheless, if and when a full update to 3.4 or later is necessary, this patch should merge pretty cleanly.
Tested on a MacBook Pro M2 Max running macOS Sequoia 15.4.1 and a MacBook Pro (2019) running macOS Monterey 12.7.5. Gracefully handles dynamic connection/disconnection of external displays and AirPlay connected displays, and removes the spurious log message noted in #2384.1 parent 830a9a0 commit e6e4809
1 file changed
Lines changed: 41 additions & 13 deletions
Lines changed: 41 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
44 | 57 | | |
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
48 | | - | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
53 | | - | |
| 66 | + | |
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
| |||
85 | 98 | | |
86 | 99 | | |
87 | 100 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
| |||
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
104 | | - | |
| 113 | + | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
| |||
328 | 337 | | |
329 | 338 | | |
330 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
331 | 354 | | |
332 | 355 | | |
333 | 356 | | |
334 | | - | |
335 | | - | |
| 357 | + | |
| 358 | + | |
336 | 359 | | |
337 | 360 | | |
338 | 361 | | |
| 362 | + | |
339 | 363 | | |
340 | 364 | | |
341 | 365 | | |
342 | 366 | | |
343 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
344 | 371 | | |
345 | | - | |
| 372 | + | |
346 | 373 | | |
347 | | - | |
| 374 | + | |
348 | 375 | | |
349 | 376 | | |
350 | 377 | | |
351 | 378 | | |
| 379 | + | |
352 | 380 | | |
353 | 381 | | |
354 | 382 | | |
| |||
0 commit comments