tauri-apps / tao

The TAO of cross-platform windowing. A library in Rust built for Tauri.
Apache License 2.0
1.63k stars 191 forks source link

feat(windows): Enable native resizing on undecorated windows with shadows #905

Open FabianLars opened 7 months ago

FabianLars commented 7 months ago

I started looking into the code because i wanted to remove the titlebar but keep the borders + shadows. Turns out the undecorated shadows code is basically what i wanted already but the code i saw when researching it was a bit different. Turns out, it looks the same (i think) as before, but now enables native resizing with resize handles outside of the window.

Only the top bar resizing is still messed up because it's just 1px because top bar resizing is typically inside the window, not outside like on the other borders :/ -> Increasing the bordersize there will make the window look ugly or will require us to color match the titlebar with the window content but it'd still be weird with the control buttons.

I never resize with the top bar so i feel like this is good enough already but we can do that in JS in tauri later and there it'd actually be correct behavior (as opposed to the current undecorated resizing which is inside the window)


I only tested this on Windows 11 so far which is why this is a draft pr, apart from wanting to get general feedback of course.