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:
parent
6f60c7a6cc
commit
62ce14a013
13 changed files with 84 additions and 1 deletions
|
|
@ -261,6 +261,9 @@ impl Window {
|
|||
window_requests.clone(),
|
||||
);
|
||||
|
||||
// Set opaque region.
|
||||
window_handle.set_transparent(attributes.transparent);
|
||||
|
||||
// Set resizable state, so we can determine how to handle `Window::set_inner_size`.
|
||||
window_handle.is_resizable.set(attributes.resizable);
|
||||
|
||||
|
|
@ -332,6 +335,11 @@ impl Window {
|
|||
self.send_request(WindowRequest::Title(title.to_owned()));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_transparent(&self, transparent: bool) {
|
||||
self.send_request(WindowRequest::Transparent(transparent));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_visible(&self, _visible: bool) {
|
||||
// Not possible on Wayland.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue