4 ms·
In the last year-ish I wrote a pure-Rust windowing and input library for Windows / MacOS. I never even had to think about making the window controls appear, th
by kettlecorn 4y ago
In the last year-ish I wrote a pure-Rust windowing and input library for Windows / MacOS.
I never even had to think about making the window controls appear, they were just there by default when I created a window.
If I eventually want to extend support to Wayland / Gnome I need to figure out how to pull in complex UI framework dependencies. Or I could write my own code to render window controls but it won't be a perfect match to the platform's aesthetic. Compared to Windows / MacOS it's a mess.
- ben-schaaf 4y agoUnless you only used QuartzCore on macOS and asked win32 for no decorations you've also pulled in a complex UI framework dependency on Windows and macOS. I agree it's a mess, but not because things work on macOS and Windows without complex UI frameworks.
- kettlecorn 4y agoOn MacOS "pulling in complex UI framework" amounts to "#[link(name = "AppKit", kind = "framework")]" somewhere in my Rust codebase. On Windows it's similar. With Gnome it seems unclear how to do something equally simple to get decorations that match the OS look and feel. The most popular Rust windowing library ended up implementing their own client-side decorations rendering that imitates GTK: https://github.com/rust-windowing/winit/pull/2263 https://github.com/rust-windowing/winit/pull/2263. And if every framework / app is doing this in their own subtly different way then the result is an OS where many apps have slightly different UX, buttons, text rendering, shadows, etc. A horribly unpolished experience.