mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
feat: add Window::is_decorated (#2172)
* feat: add `Window::is_decorated` * move it right after `set_decorations`
This commit is contained in:
@@ -426,6 +426,11 @@ impl Window {
|
||||
x11_or_wayland!(match self; Window(w) => w.set_decorations(decorations))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_decorated(&self) -> bool {
|
||||
x11_or_wayland!(match self; Window(w) => w.is_decorated())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_always_on_top(&self, _always_on_top: bool) {
|
||||
match self {
|
||||
|
||||
@@ -348,6 +348,11 @@ impl Window {
|
||||
self.send_request(WindowRequest::Decorate(decorate));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_decorated(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_minimized(&self, minimized: bool) {
|
||||
// You can't unminimize the window on Wayland.
|
||||
|
||||
@@ -895,6 +895,11 @@ impl UnownedWindow {
|
||||
self.invalidate_cached_frame_extents();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_decorated(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn set_maximizable_inner(&self, maximizable: bool) -> util::Flusher<'_> {
|
||||
let mut hints = self.xconn.get_motif_hints(self.xwindow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user