4 ms·
> Yes, they have client-side decorations, but also a single and unified UI toolkit all applications use. MacOS has Carbon and Cocoa (and WebKit). QuartzCore le
by ben-schaaf 4y ago
> Yes, they have client-side decorations, but also a single and unified UI toolkit all applications use.
MacOS has Carbon and Cocoa (and WebKit). QuartzCore lets you make windows, but doesn't give you decorations. Pretty similar to libwayland.
Windows has Win32 and while it does provide window decorations new UWP apps and thus the rather long list of various UI toolkits made by microsoft provide their own decorations. This is why dark mode doesn't work on some apps. So the situation is again pretty similar to libwayland.
Window decorations aren't even the same for different versions of Windows/macOS, so if you want to implement your own you'll end up providing multiple implementations for each platform.
The real difference is that there's a single entity with the will to go through each and every UI toolkit and update them all to look the same ahead of a new major version. That's not to say that server-side decorations are therefore bad; it's just that Microsoft and Apple put the resources behind client-side decorations to make them work as well as they do.
- PaulDavisThe1st 4y ago> MacOS has Carbon and Cocoa (and WebKit). QuartzCore lets you make windows, but doesn't give you decorations. Pretty similar to libwayland. Carbon was deprecated well over a decade ago, and has not been available for several iterations of macOS. > The real difference is that there's a single entity with the will to go through each and every UI toolkit No, the real difference is that it is absolutely clear on macOS and Windows what the obvious/preferred/blessed UI toolkit is, and anyone who chooses to use something else is extremely aware of the consequences of that (and if they weren't before making that choice, they will be very soon afterwards). On Linux, the situation is more or less the opposite. Not only do you have the choice of actual UI toolkit libraries, with none being more or less "blessed" than any other, but with Wayland's adoption, the fundamental windowing technology that sits on top of the video drivers is also not a single thing either.
- kevin_thibedeau 4y agoWhat is the blessed UI on Windows? They have more than one.
- ben-schaaf 4y agoApple certainly seem to think that WebKit is at least a partial alternative to Cocoa, given their use of it in parts of the system preferences. Apple is keeping those two in sync so things don't look out of place. Microsoft has widgets in WinAPI, and then there's WinForms, WPF, WinUI, WinJS and don't forget Electron which Microsoft themselves also ship apps with. There's also the whole win32 & UWP distinction. If you dig deep enough into the system settings you'll even find Dialogs that use the wrong window decorations.
- kettlecorn 4y agoIn 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.