diff --git a/druid-shell/src/backend/gtk/window.rs b/druid-shell/src/backend/gtk/window.rs index f6ee54edd..fdff1a348 100644 --- a/druid-shell/src/backend/gtk/window.rs +++ b/druid-shell/src/backend/gtk/window.rs @@ -975,13 +975,13 @@ impl WindowHandle { pub fn is_resizable(&self) -> bool { self.state .upgrade() - .map(true, |state| state.window.is_resizable()) + .map_or(true, |state| state.window.is_resizable()) } pub fn is_transparent(&self) -> bool { self.state .upgrade() - .map_or(false, |state| state.is_transparent) + .map_or(false, |state| state.is_transparent.get()) } pub fn show_titlebar(&self, show_titlebar: bool) { @@ -993,7 +993,7 @@ impl WindowHandle { pub fn has_titlebar(&self) -> bool { self.state .upgrade() - .map(true, |state| state.window.is_decorated()) + .map_or(true, |state| state.window.is_decorated()) } pub fn set_position(&self, mut position: Point) { diff --git a/druid-shell/src/backend/web/window.rs b/druid-shell/src/backend/web/window.rs index 4e7aedbcc..1da3e9612 100644 --- a/druid-shell/src/backend/web/window.rs +++ b/druid-shell/src/backend/web/window.rs @@ -384,29 +384,14 @@ impl WindowBuilder { // Ignored } - pub fn is_resizable(&self) -> bool { - warn!("is_resizable is unimplemented on web"); - true - } - pub fn show_titlebar(&mut self, _show_titlebar: bool) { // Ignored } - pub fn has_titlebar(&self) -> bool { - warn!("has_titlebar is unimplemented on web"); - true - } - pub fn set_transparent(&mut self, _transparent: bool) { // Ignored } - pub fn is_transparent(&self) -> bool { - warn!("is_transparent is unimplemented on web"); - true - } - pub fn set_position(&mut self, _position: Point) { // Ignored } @@ -513,13 +498,27 @@ impl WindowHandle { } pub fn resizable(&self, _resizable: bool) { - warn!("resizable unimplemented for web"); + warn!("WindowHandle::resizable unimplemented for web"); + } + + pub fn is_resizable(&self) -> bool { + warn!("WindowHandle::is_resizable is unimplemented on web"); + true } pub fn show_titlebar(&self, _show_titlebar: bool) { - warn!("show_titlebar unimplemented for web"); + warn!("WindowHandle::show_titlebar unimplemented for web"); } + pub fn has_titlebar(&self) -> bool { + warn!("WindowHandle::has_titlebar is unimplemented on web"); + true + } + + pub fn is_transparent(&self) -> bool { + warn!("WindowHandle::is_transparent is unimplemented on web"); + true + } pub fn set_position(&self, _position: Point) { warn!("WindowHandle::set_position unimplemented for web"); }