useWindowDisplay
useWindowDisplay():
DisplayInfo|null
Defined in: renderer/hooks/useWindowDisplay.ts:22
Hook to subscribe to window display info Re-renders when the window moves to a different display
Returns
Section titled “Returns”DisplayInfo | null
Current display info or null if not available
Example
Section titled “Example”function Content() { const display = useWindowDisplay(); // { id, bounds: { x, y, width, height }, workArea, scaleFactor } if (display) { console.log(`Window is on display ${display.id} with scale ${display.scaleFactor}`); }}