mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-27 21:17:13 +01:00
winit 0.30 gives an undecorated window WS_CAPTION | WS_BORDER and hides the non-client area by spreading the client rect over it (rust-windowing/winit#2419). On some Windows systems the compositor still reserves that frame, so the content is drawn offset by the caption and border while input stays at the client origin: black bars at the window's top-left and a pointer that no longer matches what it points at. Strip WS_CAPTION | WS_BORDER from the window (keeping WS_THICKFRAME and the window buttons, so edge resizing and Aero snap keep working) and recalculate the frame, restoring winit 0.27's undecorated behaviour. The guard runs every frame from raw_input_hook, so a style winit restores on a flag change (maximize, restore, …) is taken off again. Decorated windows (the system title bar preference) are left alone.