Commit 0816a7c
fix(windows): explicit DDC/HMONITOR pairing + About v-prefix (v7.0.11) (#2)
Three independent fixes bundled per the user's request.
1) About page: Latest version no longer rendered with leading "v"
- The Latest row pulled the GitHub release tag verbatim ("v7.0.10")
while Version came from `tauri.conf.json` without prefix ("7.0.10").
They now both render unprefixed; semver comparison still uses the
raw tag, so update detection is unchanged. New regression test in
`AboutPanel.test.tsx`. Engine label updated from the stale "Tauri +
Rust Sidecar" to "Tauri + Rust (in-process)" — v7.0.0 dropped the
sidecar; the label was lying.
2) Verified no server / sidecar is spun up
- `grep -r 'SERVER_PORT|externalBin|tauri-plugin-shell|find_available_port'`
across `src-tauri/` finds zero matches. Auto-update doesn't need a
local server — `AboutPanel.tsx` queries
`api.github.com/repos/synle/display-dj/releases/latest` directly.
Also refreshed `sidecar_cache.rs` docstring (now an in-process
cache, name retained from v6.x).
3) Windows external brightness: explicit DDC ↔ HMONITOR pairing
- Previous code called `ddc_winapi::Monitor::enumerate()` and
`enum_hmonitors()` independently, then `zip`'d the two Vecs by
index. `EnumDisplayMonitors` is not documented to return the same
callback order across two separate invocations — when the orders
drift, `SetVCPFeature` targets the wrong physical monitor and the
gamma write goes to the correct HMONITOR (i.e. opposite displays),
giving a visible no-op on the panel the user is actually adjusting.
- Fix: enumerate HMONITORs once, then per HMONITOR call
`ddc_winapi::get_physical_monitors_from_hmonitor(hm)` and wrap each
`PHYSICAL_MONITOR` via `Monitor::new`. Pairing is now explicit and
per-HMONITOR — orderings can no longer drift.
- Same strategy applied to `WinPlatform::debug_info()`; each DDC
entry now carries `hmonitor_index` so future diagnostic dumps
anchor DDC results to specific physical displays.
- Added `hmonitor_to_winapi()` helper for the `windows` → `winapi`
HMONITOR pointer cast.
- Documented the local patch in `VENDORING.md` so a future vendor
refresh re-applies (or upstreams) it.
Tests
- `cargo test --lib`: 236 passed
- `npm test`: 116 passed (added one regression test for the v-prefix
strip in `AboutPanel.test.tsx`).
Version
- 7.0.10 → 7.0.11 (`tauri.conf.json`, single source of truth)
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>1 parent 48ec894 commit 0816a7c
7 files changed
Lines changed: 167 additions & 68 deletions
File tree
- src-tauri
- src
- core
- src/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
49 | 61 | | |
50 | 62 | | |
51 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
803 | | - | |
| 803 | + | |
| 804 | + | |
804 | 805 | | |
805 | 806 | | |
806 | 807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
| |||
300 | 309 | | |
301 | 310 | | |
302 | 311 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
307 | 328 | | |
308 | | - | |
309 | | - | |
310 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
311 | 332 | | |
312 | 333 | | |
313 | | - | |
314 | 334 | | |
315 | 335 | | |
316 | 336 | | |
317 | 337 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
333 | 365 | | |
334 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
335 | 376 | | |
336 | 377 | | |
337 | 378 | | |
| |||
395 | 436 | | |
396 | 437 | | |
397 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
398 | 445 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
417 | 474 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | 475 | | |
422 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
423 | 482 | | |
424 | 483 | | |
425 | 484 | | |
| |||
0 commit comments