mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
Clarify Window::set_decorations/is_decorated
behaviour
This commit is contained in:
parent
42c395e49d
commit
c984476687
|
@ -281,12 +281,9 @@ impl Inner {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_decorations(&self, _decorations: bool) {
|
||||
warn!("`Window::set_decorations` is ignored on iOS")
|
||||
}
|
||||
pub fn set_decorations(&self, _decorations: bool) {}
|
||||
|
||||
pub fn is_decorated(&self) -> bool {
|
||||
warn!("`Window::is_decorated` is ignored on iOS");
|
||||
true
|
||||
}
|
||||
|
||||
|
|
|
@ -941,9 +941,13 @@ impl Window {
|
|||
|
||||
/// Turn window decorations on or off.
|
||||
///
|
||||
/// Enable/disable window decorations provided by the server or Winit.
|
||||
/// By default this is enabled. Note that fullscreen windows and windows on
|
||||
/// mobile and web platforms naturally do not have decorations.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **iOS / Android / Web:** Unsupported.
|
||||
/// - **iOS / Android / Web:** No effect.
|
||||
#[inline]
|
||||
pub fn set_decorations(&self, decorations: bool) {
|
||||
self.window.set_decorations(decorations)
|
||||
|
@ -951,10 +955,12 @@ impl Window {
|
|||
|
||||
/// Gets the window's current decorations state.
|
||||
///
|
||||
/// Returns `true` when windows are decorated (server-side or by Winit).
|
||||
/// Also returns `true` when no decorations are required (mobile, web).
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **X11:** Not implemented.
|
||||
/// - **iOS / Android / Web:** Unsupported.
|
||||
/// - **iOS / Android / Web:** Always returns `true`.
|
||||
#[inline]
|
||||
pub fn is_decorated(&self) -> bool {
|
||||
self.window.is_decorated()
|
||||
|
|
Loading…
Reference in a new issue