diff --git a/apps/desktop/main/electron-window-backend.ts b/apps/desktop/main/electron-window-backend.ts index 01688e88..a0686d2d 100644 --- a/apps/desktop/main/electron-window-backend.ts +++ b/apps/desktop/main/electron-window-backend.ts @@ -216,7 +216,6 @@ export class ElectronWindowBackend implements WindowBackend, BackendMigrationShi this.quitPromptPending.clear(); }); (app as unknown as { on(e: string, l: () => void): void }).on('did-become-active', () => { - wmLog('diag-app-active', { active: true }); // TEMP-DIAG const askedFor = getKernelExecutor().getState().pendingColdStartFocus; kernelAppActivated(); // Armed only for a window the activation really can put in front. @@ -225,7 +224,6 @@ export class ElectronWindowBackend implements WindowBackend, BackendMigrationShi this.activationFocusTarget = askedRecord !== undefined && askedRecord.visible ? askedFor : null; }); (app as unknown as { on(e: string, l: () => void): void }).on('did-resign-active', () => { - wmLog('diag-app-active', { active: false }); // TEMP-DIAG this.activationFocusTarget = null; kernelAppResigned(); if (this.appResignSettleTimer) clearTimeout(this.appResignSettleTimer); @@ -941,46 +939,6 @@ export class ElectronWindowBackend implements WindowBackend, BackendMigrationShi } catch { /* pinning a torn-down window is a no-op */ } - // TEMP-DIAG: while any window is held, sample every native window once a - // second. A read-only observation sampler, not a wait on anything: native - // window level and visibility change with no event to hang a log on. - wmLog('diag-pin', { id, on }); - if (on && !this.diagDumpTimer) { - this.diagDumpTimer = setInterval(() => this.diagDumpWindows('tick'), 1000); - } - this.diagDumpWindows(on ? 'hold' : 'release'); - } - - // TEMP-DIAG - private diagDumpTimer: ReturnType | null = null; - private diagAcceptsInput = new Map(); - private diagDumpWindows(why: string): void { - for (const [wid, entry] of this.windows) { - const w = entry.win as unknown as { - isDestroyed(): boolean; - isVisible(): boolean; - isAlwaysOnTop(): boolean; - isFocused?(): boolean; - getOpacity?(): number; - getBounds(): Rectangle; - }; - try { - if (!w || w.isDestroyed()) continue; - if (!w.isVisible()) continue; - const b = w.getBounds(); - wmLog('diag-win', { - why, - id: wid, - onTop: w.isAlwaysOnTop(), - focused: w.isFocused ? w.isFocused() : undefined, - opacity: w.getOpacity ? w.getOpacity() : undefined, - acceptsInput: this.diagAcceptsInput.get(wid), - bounds: `${b.x},${b.y},${b.width}x${b.height}`, - }); - } catch { - /* diag only */ - } - } } // A `pinned` window (the chrome overlay) needs `setAlwaysOnTop` rather than @@ -1039,9 +997,6 @@ export class ElectronWindowBackend implements WindowBackend, BackendMigrationShi try { if (win.isDestroyed()) return; win.setIgnoreMouseEvents(!acceptsInput, { forward: true }); - // TEMP-DIAG - this.diagAcceptsInput.set(id, acceptsInput); - wmLog('diag-accepts-input', { id, acceptsInput, visible: win.isVisible() }); } catch { /* torn-down window mid-command — the machine already recorded intent */ } diff --git a/apps/desktop/main/hybrid-overlay.ts b/apps/desktop/main/hybrid-overlay.ts index f9d6f2a5..14fd5144 100644 --- a/apps/desktop/main/hybrid-overlay.ts +++ b/apps/desktop/main/hybrid-overlay.ts @@ -465,8 +465,6 @@ function wireClickCapture(): void { // click-through until the app is active again (become-active restores it). const capture = !!(msg && msg.capture) && getAppActive(); lastCaptureState = capture; - // TEMP-DIAG - console.log(`[wm] t=${Date.now()} event=diag-capture-request asked=${!!(msg && msg.capture)} appActive=${getAppActive()} honored=${capture}`); if (!overlayWin || overlayWin.isDestroyed()) return; // Kernel click-through intent (window-kernel.ts SetAcceptsInput) — R2: // only the backend calls `setIgnoreMouseEvents` now. capture:true means