Add Window::set_transparent

Provide a hint to system compositor whether the window is transparent or
not. Only implemented on macOS and Wayland for now.
This commit is contained in:
Kirill Chibisov 2023-01-15 23:39:36 +03:00 committed by GitHub
parent 6f60c7a6cc
commit 62ce14a013
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 84 additions and 1 deletions

View file

@ -506,6 +506,10 @@ impl WinitWindow {
util::set_title_sync(self, title);
}
pub fn set_transparent(&self, transparent: bool) {
self.setOpaque(!transparent)
}
pub fn set_visible(&self, visible: bool) {
match visible {
true => util::make_key_and_order_front_sync(self),