MacOS minimize support #983
Labels
C - needs discussion
Direction must be ironed out
DS - macos
S - api
Design and usability
S - enhancement
Wouldn't this be the coolest?
This has been reported to Alacritty in alacritty/alacritty#2534.
Currently winit exposes an API on all platforms to set the window visibility using the
set_visible
method. If this is called on macOS, the window is hidden without adding it to the dock, this is working as intended.However, on macOS a different method of hiding windows exists too, this is called
miniaturize
in their docs which makes the window invisible and adds it to the dock. I believe this is what happens when the minimize button is clicked in the window decorations, but as far as I can tell there's no way to call this explicitly from winit.The generated cocoa-rs bindings provide this method on
NsWindow
. So I think it should be relatively trivial to implement this using theWindowsExtMacOS
, since I don't think it's available in this fashion on any other platform.Alternatively, this could be declared as out of scope, so downstream consumers would have to use the
ns_window
call instead to do this themselves.The text was updated successfully, but these errors were encountered: