diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index d42c583e..bf1c241d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -840,6 +840,8 @@ fn create_window(handle: &AppHandle, url: Option<&str>) -> Window { match e { WindowEvent::Resized(..) => apply_offset(), WindowEvent::ThemeChanged(..) => apply_offset(), + WindowEvent::Focused(..) => apply_offset(), + WindowEvent::ScaleFactorChanged { .. } => apply_offset(), WindowEvent::CloseRequested { .. } => { println!("CLOSE REQUESTED"); // api.prevent_close(); diff --git a/src-tauri/src/window_ext.rs b/src-tauri/src/window_ext.rs index d8133352..85040ba7 100644 --- a/src-tauri/src/window_ext.rs +++ b/src-tauri/src/window_ext.rs @@ -10,7 +10,7 @@ pub trait TrafficLightWindowExt { impl TrafficLightWindowExt for Window { #[cfg(not(target_os = "macos"))] fn position_traffic_lights(&self) { - // No-op + // No-op on other platforms } #[cfg(target_os = "macos")] diff --git a/src-web/hooks/useSyncWindowTitle.ts b/src-web/hooks/useSyncWindowTitle.ts index 4e71bcac..78017f3b 100644 --- a/src-web/hooks/useSyncWindowTitle.ts +++ b/src-web/hooks/useSyncWindowTitle.ts @@ -1,4 +1,3 @@ -import { appWindow } from '@tauri-apps/api/window'; import { useEffect } from 'react'; import { fallbackRequestName } from '../lib/fallbackRequestName'; import { useActiveEnvironment } from './useActiveEnvironment'; @@ -17,6 +16,9 @@ export function useSyncWindowTitle() { if (activeRequest) { newTitle += ` – ${fallbackRequestName(activeRequest)}`; } - appWindow.setTitle(newTitle).catch(console.error); + + console.log('Skipping setting window title to ', newTitle); + // TODO: This resets the stoplight position so we can't use it yet + // appWindow.setTitle(newTitle).catch(console.error); }, [activeEnvironment, activeRequest, activeWorkspace]); }