All your computers and your phone/iPhone, working as one desk. Screens, apps, files, clipboard, calls, texts, notifications, mouse and keyboard, shared between Mac, Windows, Linux , Android, Web and ios / ipados . Free and open source. No account, no cloud, and no shared network needed.
JavaScript androidapple-ecosystemconnectelectronfile-sharingintel-unison-alternativeiosios-windowskde-connect-alternativekvmlinuxmacbookmacosmouse-sharingphone-link-alternativeproductivityscreen-sharingsidecar-alternativesynergy-alternativewindows
Deck fixes for 3.3.1: OBS connect in Multi-device, Go to page stays itself, WMI brightness on Windows (#394, #395)
inukaasith4a4b1c2eb549
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 002134f4..574ff600 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -20,6 +20,16 @@ Everyone who sent code, reported a problem or tested is thanked under their verslonger declare it, as in 3.2.1. Thanks to [@nxbeeeel](https://github.com/nxbeeeel) for tracking itdown to the phone's socket, and to [@abdelmoumenegue](https://github.com/abdelmoumenegue) and[@clxud-code](https://github.com/clxud-code) for the reports.+- **Deck: OBS Connect did nothing in Multi-device** (#394): the computer's Deck page had no way to+ save OBS's port and password there. It does now on the Mac, Windows and Linux, and OBS tiles show+ OBS's scenes and sources in Multi-device too.+- **Deck: a new Go to page tile turned into a Label** (#394): it stays a Go to page tile with+ Choose a page until one is picked. A tile whose page was removed waits for another the same way.+- **Deck brightness on Windows laptops** (#395): the built-in display is also found through Windows'+ own brightness (WMI), which most Windows 11 laptops answer, when the display driver's doesn't.+- **Multi-device: the Cursor portals card shows on the Mouse page** (#398, #399 by+ [@pengusto](https://github.com/pengusto)), and the Jump to a device card is translated and padded+ (#400 by [@pengusto](https://github.com/pengusto)).## 3.3.0diff --git a/linux/mesh/ipc.js b/linux/mesh/ipc.jsindex ea2da7f6..1aacb607 100644--- a/linux/mesh/ipc.js+++ b/linux/mesh/ipc.js@@ -378,7 +378,10 @@ function setupIpc(ctx) {return r.canceled || !r.filePaths.length ? '' : r.filePaths[0];});handle('deckRun', (a) => { const d = ctx.deck && ctx.deck(); return d && a && typeof a === 'object' ? d.exec(a).then(() => ({ ok: true }), (e) => ({ ok: false, why: e.message })) : { ok: false }; }); // Try- handle('deckState', (o) => { const d = ctx.deck && ctx.deck(); return d ? d.state(false, o === 'mix').catch(() => ({})) : {}; }); // sound devices, Bluetooth devices, displays+ handle('deckState', (o) => { const d = ctx.deck && ctx.deck(); return d ? d.state(o === true, o === 'mix').catch(() => ({})) : {}; }); // sound devices, Bluetooth devices, displays (OBS's: true; each app's volume: 'mix')+ // OBS Studio's port and password (#394): Multi-device had no way to set them, so Connect did nothing.+ handle('deckObs', () => { const d = ctx.deck && ctx.deck(); return d ? d.obsConfig() : null; });+ handle('deckSetObs', (v) => { const d = ctx.deck && ctx.deck(); return d && v && typeof v === 'object' ? d.setObs(v) : { on: false }; }); // → OBS's state with themhandle('deckGitHub', (v) => { const d = ctx.deck && ctx.deck(); return d && d.gitHub && (v === undefined || v === null || typeof v === 'string') ? d.gitHub(v) : { hasToken: false }; }); // the Build widget's GitHub token: kept sealed, never sent back// Remote tab: each phone's Remote page here (shared/perphone.js phoneRemote).handle('setRemote', (m) => {diff --git a/linux/mesh/preload-app.js b/linux/mesh/preload-app.jsindex becc9a85..d7431498 100644--- a/linux/mesh/preload-app.js+++ b/linux/mesh/preload-app.js@@ -74,7 +74,7 @@ contextBridge.exposeInMainWorld('macshare', {camera: call('camera'),drop: call('drop'), // Drop (shared/drop-host.js)soundRoute: call('soundRoute'), soundSpeakers: call('soundSpeakers'), soundOwn: call('soundOwn'), soundVolume: call('soundVolume'), // Audio › the mixer- deckSave: call('deckSave'), deckTry: call('deckTry'), deckApps: call('deckApps'), deckState: call('deckState'), deckGitHub: call('deckGitHub'), deckRun: call('deckRun'), deckPick: call('deckPick'), // the Deck page+ deckSave: call('deckSave'), deckTry: call('deckTry'), deckApps: call('deckApps'), deckState: call('deckState'), deckGitHub: call('deckGitHub'), deckObs: call('deckObs'), deckSetObs: call('deckSetObs'), deckRun: call('deckRun'), deckPick: call('deckPick'), // the Deck pageiosSign: call('iosSign'), iosSignIpa: call('iosSignIpa'), // TwinDesk iPhone (shared/iossign.js)setRemote: call('setRemote'), // Remote tab (shared/phone-remote.js)setReZume: call('setReZume'), // ReZume tab (shared/rezume.js)diff --git a/mac/mesh/ipc.js b/mac/mesh/ipc.jsindex 141dc5a6..6f72a8de 100644--- a/mac/mesh/ipc.js+++ b/mac/mesh/ipc.js@@ -1003,7 +1003,10 @@ function setupIpc(ctx) {ipcMain.handle('soundSpeakers', (_e, list) => { if (Array.isArray(list) && list.length <= 32 && ctx.audio && ctx.audio.setSpeakers) ctx.audio.setSpeakers(list); }); // this Mac's speakers, from the settings windowipcMain.handle('soundOwn', (_e, v) => { const o = ctx.ownSound; if (!o) return; if (Array.isArray(v) && v.length <= 8) o.set(v); else if (v && typeof v === 'object' && typeof v.mode === 'string') o.mode(v.mode); else if (v && typeof v === 'object' && typeof v.def === 'string') o.setDefault(v.def); }); // This Mac: System default or Choose devices (shared/own-sound.js)ipcMain.handle('soundVolume', (_e, level) => require('../../shared/sound-local.js').volume('darwin', ctx.helper, level).catch(() => ({ volume: null })));- ipcMain.handle('deckState', () => (ctx.deck ? ctx.deck.state().catch(() => ({})) : {})); // its sound, Bluetooth and display pickers+ ipcMain.handle('deckState', (_e, obs) => (ctx.deck ? ctx.deck.state(obs === true, obs === 'mix').catch(() => ({})) : {})); // its sound, Bluetooth and display pickers (OBS's: obs)+ // OBS Studio's port and password (#394): Multi-device had no way to set them, so Connect did nothing.+ ipcMain.handle('deckObs', () => (ctx.deck ? ctx.deck.obsConfig() : null));+ ipcMain.handle('deckSetObs', (_e, v) => (ctx.deck && v && typeof v === 'object' ? ctx.deck.setObs(v) : { on: false })); // → OBS's state with themipcMain.handle('deckGitHub', (_e, v) => (ctx.deck && ctx.deck.gitHub && (v === undefined || v === null || typeof v === 'string') ? ctx.deck.gitHub(v) : { hasToken: false })); // the Build widget's GitHub token: kept sealed, never sent backipcMain.handle('phoneListCameras', () => (ctx.phone && ctx.phone.bridge ? ctx.phone.bridge.listCameras() : [])); // Camera: the phone's camerasfor (const [name, fn] of Object.entries(actions)) ipcMain.on(name, (_e, arg) => fn(arg));diff --git a/mac/mesh/preload-control.js b/mac/mesh/preload-control.jsindex 0ac356a3..9a186a74 100644--- a/mac/mesh/preload-control.js+++ b/mac/mesh/preload-control.js@@ -47,7 +47,9 @@ api.padState = (st) => ipcRenderer.send('padState', st);api.onSendPick = (fn) => ipcRenderer.on('sendPick', (_e, paths) => fn(paths)); // Finder › Send with TwinDesk: which devicesapi.unlocker = (op, arg) => ipcRenderer.send('unlocker', { op, arg }); // Unlock other computers (shared/unlock-client.js)api.deckApps = () => ipcRenderer.invoke('deckApps'); // the Deck page's app picker-api.deckState = () => ipcRenderer.invoke('deckState');+api.deckState = (o) => ipcRenderer.invoke('deckState', o);+api.deckObs = () => ipcRenderer.invoke('deckObs');+api.deckSetObs = (v) => ipcRenderer.invoke('deckSetObs', v);api.deckGitHub = (v) => ipcRenderer.invoke('deckGitHub', v);api.drop = (o) => ipcRenderer.invoke('drop', o); // Drop (shared/drop-host.js)api.soundRoute = (o) => ipcRenderer.invoke('soundRoute', o); // Audio › the mixerdiff --git a/shared/deck-model.js b/shared/deck-model.jsindex 66790057..474d9189 100644--- a/shared/deck-model.js+++ b/shared/deck-model.js@@ -176,8 +176,9 @@case 'nav': {const w = what('next');const to = idOf(a.to);- if ((w === 'page' || w === 'space') && !to) return { k: 'none' };- return w === 'page' || w === 'space' ? { k, what: w, to } : { k, what: w };+ // No page or space picked yet (a Go to page tile just added, #394): still that tile, its editor+ // offers the pick, and the devices do nothing with it until then. It used to become a Label.+ return w === 'page' || w === 'space' ? { k, what: w, to: to || '' } : { k, what: w };}case 'widget': {const w = what('clock');@@ -295,9 +296,9 @@}).filter(Boolean);const out = { v: 2, swipe: { pages: sw.pages !== false, spaces: sw.spaces !== false }, orient, look: look(src.look), spaces };if (!spaces.length) return normalize(starter());- // Navigate to a page or space that's gone: nothing.+ // Navigate to a page or space that's gone: no target, the tile stays to be pointed elsewhere.const fix = (a) => {- if (a.k === 'nav' && (a.what === 'page' || a.what === 'space') && !ids.has(a.to)) return { k: 'none' };+ if (a.k === 'nav' && (a.what === 'page' || a.what === 'space') && a.to && !ids.has(a.to)) return { ...a, to: '' };return a;};for (const s of spaces) for (const p of s.pages || []) for (const t of p.tiles) t.action = fix(t.action);diff --git a/shared/lang/de.js b/shared/lang/de.jsindex 03a2f556..ae667b91 100644--- a/shared/lang/de.js+++ b/shared/lang/de.js@@ -2803,5 +2803,7 @@"Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.": "Klicke auf ein Gerät, um ihm ein Tastenkürzel aus 2 bis 4 Tasten zu geben. Drückst du es irgendwo auf einem beliebigen Gerät, springt der Zeiger dorthin.","Shortcut to jump to {device}": "Tastenkürzel, um zu {device} zu springen","Shortcut to bring everything back to {device}": "Tastenkürzel, um alles zu {device} zurückzuholen",- "Another app uses the shortcut for {devices}. Pick other keys.": "Eine andere App nutzt das Tastenkürzel für {devices}. Wähle andere Tasten."+ "Another app uses the shortcut for {devices}. Pick other keys.": "Eine andere App nutzt das Tastenkürzel für {devices}. Wähle andere Tasten.",+ "Choose a page": "Seite wählen",+ "Choose a space": "Bereich wählen"});diff --git a/shared/lang/en.js b/shared/lang/en.jsindex 8d83e597..36ab5f45 100644--- a/shared/lang/en.js+++ b/shared/lang/en.js@@ -2805,5 +2805,7 @@"Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.": "Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.","Shortcut to jump to {device}": "Shortcut to jump to {device}","Shortcut to bring everything back to {device}": "Shortcut to bring everything back to {device}",- "Another app uses the shortcut for {devices}. Pick other keys.": "Another app uses the shortcut for {devices}. Pick other keys."+ "Another app uses the shortcut for {devices}. Pick other keys.": "Another app uses the shortcut for {devices}. Pick other keys.",+ "Choose a page": "Choose a page",+ "Choose a space": "Choose a space"});diff --git a/shared/lang/es.js b/shared/lang/es.jsindex bceda099..051a329d 100644--- a/shared/lang/es.js+++ b/shared/lang/es.js@@ -2803,5 +2803,7 @@"Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.": "Haz clic en un dispositivo para darle un atajo de 2 a 4 teclas. Púlsalo en cualquier lugar, en cualquier dispositivo, para llevar el puntero allí.","Shortcut to jump to {device}": "Atajo para saltar a {device}","Shortcut to bring everything back to {device}": "Atajo para traer todo de vuelta a {device}",- "Another app uses the shortcut for {devices}. Pick other keys.": "Otra app usa el atajo de {devices}. Elige otras teclas."+ "Another app uses the shortcut for {devices}. Pick other keys.": "Otra app usa el atajo de {devices}. Elige otras teclas.",+ "Choose a page": "Elige una página",+ "Choose a space": "Elige un espacio"});diff --git a/shared/lang/pt-BR.js b/shared/lang/pt-BR.jsindex f752564b..8e60ccd6 100644--- a/shared/lang/pt-BR.js+++ b/shared/lang/pt-BR.js@@ -2805,5 +2805,7 @@"Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.": "Clique em um dispositivo para dar a ele um atalho de 2 a 4 teclas. Pressione-o em qualquer lugar, em qualquer dispositivo, para levar o ponteiro até lá.","Shortcut to jump to {device}": "Atalho para ir para {device}","Shortcut to bring everything back to {device}": "Atalho para trazer tudo de volta para {device}",- "Another app uses the shortcut for {devices}. Pick other keys.": "Outro app usa o atalho de {devices}. Escolha outras teclas."+ "Another app uses the shortcut for {devices}. Pick other keys.": "Outro app usa o atalho de {devices}. Escolha outras teclas.",+ "Choose a page": "Escolha uma página",+ "Choose a space": "Escolha um espaço"});diff --git a/shared/lang/ru.js b/shared/lang/ru.jsindex 695c12e0..b865a4d1 100644--- a/shared/lang/ru.js+++ b/shared/lang/ru.js@@ -2805,5 +2805,7 @@"Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.": "Нажмите на устройство, чтобы назначить ему сочетание из 2–4 клавиш. Нажмите его где угодно, на любом устройстве, чтобы перенести туда указатель.","Shortcut to jump to {device}": "Сочетание для перехода к {device}","Shortcut to bring everything back to {device}": "Сочетание, чтобы вернуть всё на {device}",- "Another app uses the shortcut for {devices}. Pick other keys.": "Другое приложение использует сочетание для {devices}. Выберите другие клавиши."+ "Another app uses the shortcut for {devices}. Pick other keys.": "Другое приложение использует сочетание для {devices}. Выберите другие клавиши.",+ "Choose a page": "Выберите страницу",+ "Choose a space": "Выберите пространство"});diff --git a/shared/lang/tr.js b/shared/lang/tr.jsindex 03b82eae..1e35f7a1 100644--- a/shared/lang/tr.js+++ b/shared/lang/tr.js@@ -2805,5 +2805,7 @@"Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.": "Bir cihaza 2 ila 4 tuşluk bir kısayol vermek için tıklayın. İşaretçiyi oraya taşımak için kısayola herhangi bir cihazda, herhangi bir yerde basın.","Shortcut to jump to {device}": "{device} cihazına atlama kısayolu","Shortcut to bring everything back to {device}": "Her şeyi {device} cihazına geri getirme kısayolu",- "Another app uses the shortcut for {devices}. Pick other keys.": "Başka bir uygulama {devices} için kısayolu kullanıyor. Başka tuşlar seçin."+ "Another app uses the shortcut for {devices}. Pick other keys.": "Başka bir uygulama {devices} için kısayolu kullanıyor. Başka tuşlar seçin.",+ "Choose a page": "Bir sayfa seçin",+ "Choose a space": "Bir alan seçin"});diff --git a/shared/lang/zh-CN.js b/shared/lang/zh-CN.jsindex f2a4aa64..7887ad8f 100644--- a/shared/lang/zh-CN.js+++ b/shared/lang/zh-CN.js@@ -2806,5 +2806,7 @@"Click a device to give it a shortcut of 2 to 4 keys. Press it anywhere, on any device, to move the pointer there.": "点击一个设备,为它设置由 2 到 4 个键组成的快捷键。在任意设备的任意位置按下它,指针就会移到那里。","Shortcut to jump to {device}": "跳转到 {device} 的快捷键","Shortcut to bring everything back to {device}": "将一切带回 {device} 的快捷键",- "Another app uses the shortcut for {devices}. Pick other keys.": "另一个应用正在使用 {devices} 的快捷键。请选择其他按键。"+ "Another app uses the shortcut for {devices}. Pick other keys.": "另一个应用正在使用 {devices} 的快捷键。请选择其他按键。",+ "Choose a page": "选择页面",+ "Choose a space": "选择空间"});diff --git a/shared/test/deck.js b/shared/test/deck.jsindex a2da70b3..e8603648 100644--- a/shared/test/deck.js+++ b/shared/test/deck.js@@ -29,7 +29,7 @@ assert.deepStrictEqual(M.action({ k: 'sys', what: 'shutdown' }), { k: 'sys', whaassert.deepStrictEqual(M.action({ k: 'cmd', command: 'rm -rf /' }), { k: 'none' }, 'no command actions at all');assert.deepStrictEqual(M.action({ k: 'evil' }), { k: 'none' });assert.deepStrictEqual(M.action({ k: 'volume', what: 'set', level: 140 }), { k: 'volume', what: 'set', level: 100, step: 6 });-assert.deepStrictEqual(M.action({ k: 'nav', what: 'page' }), { k: 'none' }, 'a page to go to');+assert.deepStrictEqual(M.action({ k: 'nav', what: 'page' }), { k: 'nav', what: 'page', to: '' }, 'a Go to page tile before its page is picked (#394)');const macro = M.action({ k: 'macro', steps: [{ action: { k: 'keys', combo: 'Mod+KeyC' }, wait: 99999 }, { action: { k: 'macro', steps: [] } }, { action: { k: 'nav', what: 'next' } }, { action: { k: 'slider', what: 'volume' } }] });assert.strictEqual(macro.steps.length, 1, 'no device steps, sliders or macros in a macro');assert.strictEqual(macro.steps[0].wait, 10000, 'waits clamped');diff --git a/shared/ui-deck.js b/shared/ui-deck.jsindex 8350da29..e10a3e31 100644--- a/shared/ui-deck.js+++ b/shared/ui-deck.js@@ -618,8 +618,9 @@}break;case 'nav':- if (a.what === 'page') out.push(field(t('Page'), pick(space().pages.map((x) => ({ value: x.id, label: x.name })), a.to, (to) => act({ to }))));- if (a.what === 'space') out.push(field(t('Space'), pick(L.spaces.map((x) => ({ value: x.id, label: x.name })), a.to, (to) => act({ to }))));+ // No target yet (just added, or its page was removed): a first entry to pick from (#394).+ if (a.what === 'page') out.push(field(t('Page'), pick([...(a.to ? [] : [{ value: '', label: t('Choose a page') }]), ...space().pages.map((x) => ({ value: x.id, label: x.name }))], a.to, (to) => act({ to }))));+ if (a.what === 'space') out.push(field(t('Space'), pick([...(a.to ? [] : [{ value: '', label: t('Choose a space') }]), ...L.spaces.map((x) => ({ value: x.id, label: x.name }))], a.to, (to) => act({ to }))));break;default:}diff --git a/windows-helper/build.cmd b/windows-helper/build.cmdindex 4c94ae7b..6b346b9d 100644--- a/windows-helper/build.cmd+++ b/windows-helper/build.cmd@@ -22,7 +22,7 @@ set WINRT=/r:"%UM%\Windows.winmd" /r:"%FW%\System.Runtime.WindowsRuntime.dll" /r/r:"%FW%\System.Threading.Tasks.dll" /r:"%FW%\System.Runtime.InteropServices.WindowsRuntime.dll" /r:System.Security.dllif not exist "%BIN%" mkdir "%BIN%""%CSC%" /nologo /optimize+ /platform:anycpu /target:exe /out:"%BIN%\macshare-winhelper.new.exe" ^- /r:System.Web.Extensions.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll %UIA% %WINRT% "%~dp0src\*.cs" || exit /b 1+ /r:System.Web.Extensions.dll /r:System.Management.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll %UIA% %WINRT% "%~dp0src\*.cs" || exit /b 1rem The previous build may still be running (old.exe): then park the current one under another name.del /q "%BIN%\macshare-winhelper.old*.exe" 2>nulset OLD=macshare-winhelper.old.exe@@ -32,7 +32,7 @@ ren "%BIN%\macshare-winhelper.new.exe" macshare-winhelper.exerem Multi-device's helper (docs/multi-device.md): the same sources with MULTI, several watched sidesrem (CaptureMulti.cs); only windows/mesh starts it. Without MULTI the code above is the one-to-one helper's."%CSC%" /nologo /optimize+ /platform:anycpu /target:exe /define:MULTI /out:"%BIN%\macshare-winhelper-multi.new.exe" ^- /r:System.Web.Extensions.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll %UIA% %WINRT% "%~dp0src\*.cs" || exit /b 1+ /r:System.Web.Extensions.dll /r:System.Management.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll %UIA% %WINRT% "%~dp0src\*.cs" || exit /b 1del /q "%BIN%\macshare-winhelper-multi.old*.exe" 2>nulset OLD=macshare-winhelper-multi.old.exeif exist "%BIN%\%OLD%" set OLD=macshare-winhelper-multi.old-%RANDOM%.exe@@ -66,5 +66,5 @@ rem The Full KVM build only (docs/full-kvm.md, TWINDESK_EDITION=full-kvm): the arem on every desktop (Agent.cs, FULLKVM) and the service itself (windows\fullkvm\build.cmd).if /i not "%TWINDESK_EDITION%"=="full-kvm" exit /b 0"%CSC%" /nologo /optimize+ /platform:anycpu /target:exe /define:MULTI;FULLKVM /out:"%BIN%\macshare-winhelper-agent.exe" ^- /r:System.Web.Extensions.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll %UIA% %WINRT% "%~dp0src\*.cs" || exit /b 1+ /r:System.Web.Extensions.dll /r:System.Management.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll %UIA% %WINRT% "%~dp0src\*.cs" || exit /b 1call "%~dp0..\windows\fullkvm\build.cmd" || exit /b 1diff --git a/windows-helper/src/DeckSys.cs b/windows-helper/src/DeckSys.csindex 483ed039..9d2eb590 100644--- a/windows-helper/src/DeckSys.cs+++ b/windows-helper/src/DeckSys.cs@@ -8,7 +8,7 @@// deckBtRadio {on}; deckBtConnect {id, on}: an audio device's services on or off (as Settings'// Connect and Disconnect do)// deckBright -> {displays: [{id, name, level, internal}]}; deckBrightSet {id, level} (id "" = all):-// the built-in panel through the display driver, external monitors through DDC/CI+// the built-in panel through the display driver, else WMI; external monitors through DDC/CI// deckWinFront -> {wid}; deckMinWins -> {windows}: the minimized ones; deckWinFrame {wid, x, y, w, h}: restored, then to that visible frame;// deckWinOp {wid, op: min|max|close|restore}// deckSys {what: lock|sleep|screenoff|darkmode|dnd, on?}@@ -18,6 +18,7 @@using System;using System.Collections.Generic;using System.ComponentModel;+using System.Management; // WMI brightness (build.cmd references System.Management.dll)using System.Runtime.InteropServices;using System.Text;using System.Threading;@@ -319,7 +320,45 @@ namespace MacSharereturn levels;}+ // Most Windows 11 laptops answer only here (#395): the panel's WMI brightness, what the Settings+ // slider uses. \\.\LCD comes first, and this when it has no panel (or doesn't open for this user).+ static int WmiGet()+ {+ try+ {+ using (ManagementObjectSearcher q = new ManagementObjectSearcher("root\\WMI", "SELECT CurrentBrightness FROM WmiMonitorBrightness WHERE Active=TRUE"))+ foreach (ManagementObject o in q.Get()) using (o) return Convert.ToInt32(o["CurrentBrightness"]);+ }+ catch (Exception) { }+ return -1;+ }++ static bool WmiSet(int level)+ {+ bool any = false;+ try+ {+ using (ManagementObjectSearcher q = new ManagementObjectSearcher("root\\WMI", "SELECT * FROM WmiMonitorBrightnessMethods WHERE Active=TRUE"))+ foreach (ManagementObject o in q.Get()) using (o) { o.InvokeMethod("WmiSetBrightness", new object[] { (uint)1, (byte)Math.Max(0, Math.Min(100, level)) }); any = true; }+ }+ catch (Exception) { }+ return any;+ }+static int PanelGet()+ {+ int lcd = LcdGet();+ return lcd >= 0 ? lcd : WmiGet();+ }++ static void PanelSet(int level)+ {+ Exception lcd = null;+ try { LcdSet(level); return; } catch (Exception e) { lcd = e; }+ if (!WmiSet(level)) throw lcd;+ }++ static int LcdGet(){IntPtr h = Lcd();if (h == INVALID) return -1;@@ -334,7 +373,7 @@ namespace MacSharefinally { CloseHandle(h); }}- static void PanelSet(int level)+ static void LcdSet(int level){IntPtr h = Lcd();if (h == INVALID) throw new Exception("No built-in display");diff --git a/windows/mesh/ipc.js b/windows/mesh/ipc.jsindex a7a8108a..5d882097 100644--- a/windows/mesh/ipc.js+++ b/windows/mesh/ipc.js@@ -383,7 +383,10 @@ function setupIpc(ctx) {return r.canceled || !r.filePaths.length ? '' : r.filePaths[0];});handle('deckRun', (a) => { const d = ctx.deck && ctx.deck(); return d && a && typeof a === 'object' ? d.exec(a).then(() => ({ ok: true }), (e) => ({ ok: false, why: e.message })) : { ok: false }; }); // Try- handle('deckState', (o) => { const d = ctx.deck && ctx.deck(); return d ? d.state(false, o === 'mix').catch(() => ({})) : {}; }); // sound devices, Bluetooth devices, displays+ handle('deckState', (o) => { const d = ctx.deck && ctx.deck(); return d ? d.state(o === true, o === 'mix').catch(() => ({})) : {}; }); // sound devices, Bluetooth devices, displays (OBS's: true; each app's volume: 'mix')+ // OBS Studio's port and password (#394): Multi-device had no way to set them, so Connect did nothing.+ handle('deckObs', () => { const d = ctx.deck && ctx.deck(); return d ? d.obsConfig() : null; });+ handle('deckSetObs', (v) => { const d = ctx.deck && ctx.deck(); return d && v && typeof v === 'object' ? d.setObs(v) : { on: false }; }); // → OBS's state with themhandle('deckGitHub', (v) => { const d = ctx.deck && ctx.deck(); return d && d.gitHub && (v === undefined || v === null || typeof v === 'string') ? d.gitHub(v) : { hasToken: false }; }); // the Build widget's GitHub token: kept sealed, never sent back// Remote tab: each phone's Remote page here (shared/perphone.js phoneRemote).handle('setRemote', (m) => {diff --git a/windows/mesh/preload-app.js b/windows/mesh/preload-app.jsindex 6174d967..39a4b423 100644--- a/windows/mesh/preload-app.js+++ b/windows/mesh/preload-app.js@@ -76,7 +76,7 @@ contextBridge.exposeInMainWorld('macshare', {camera: call('camera'),drop: call('drop'), // Drop (shared/drop-host.js)soundRoute: call('soundRoute'), soundSpeakers: call('soundSpeakers'), soundOwn: call('soundOwn'), soundVolume: call('soundVolume'), // Audio › the mixer- deckSave: call('deckSave'), deckTry: call('deckTry'), deckApps: call('deckApps'), deckState: call('deckState'), deckGitHub: call('deckGitHub'), deckRun: call('deckRun'), deckPick: call('deckPick'), // the Deck page+ deckSave: call('deckSave'), deckTry: call('deckTry'), deckApps: call('deckApps'), deckState: call('deckState'), deckGitHub: call('deckGitHub'), deckObs: call('deckObs'), deckSetObs: call('deckSetObs'), deckRun: call('deckRun'), deckPick: call('deckPick'), // the Deck pageiosSign: call('iosSign'), iosSignIpa: call('iosSignIpa'), // TwinDesk iPhone (shared/iossign.js)setRemote: call('setRemote'), // Remote tab (shared/phone-remote.js)setReZume: call('setReZume'), // ReZume tab (shared/rezume.js)