diff --git a/CHANGELOG.md b/CHANGELOG.md index 52c39091c9..b37d5ef095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ - On X11, the `Moved` event is no longer sent when the window is resized without changing position. - `MouseCursor` and `CursorState` now implement `Default`. -- `WindowBuilder::with_resizable` implemented for Windows, X11, and macOS. -- `Window::set_resizable` implemented for Windows, X11, and macOS. +- `WindowBuilder::with_resizable` implemented for Windows, X11, Wayland, and macOS. +- `Window::set_resizable` implemented for Windows, X11, Wayland, and macOS. - On X11, if the monitor's width or height in millimeters is reported as 0, the DPI is now 1.0 instead of +inf. - On X11, the environment variable `WINIT_HIDPI_FACTOR` has been added for overriding DPI factor. - On X11, enabling transparency no longer causes the window contents to flicker when resizing. diff --git a/Cargo.toml b/Cargo.toml index 6bb15d3ac6..3af31a596e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ features = [ [target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))'.dependencies] wayland-client = { version = "0.20.6", features = [ "dlopen", "egl", "cursor"] } -smithay-client-toolkit = "0.2.1" +smithay-client-toolkit = "0.2.2" x11-dl = "2.17.5" parking_lot = "0.5" percent-encoding = "1.0" diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs index 686ec46586..2083462352 100644 --- a/src/platform/linux/mod.rs +++ b/src/platform/linux/mod.rs @@ -237,7 +237,7 @@ impl Window { pub fn set_resizable(&self, resizable: bool) { match self { &Window::X(ref w) => w.set_resizable(resizable), - &Window::Wayland(ref _w) => unimplemented!(), + &Window::Wayland(ref w) => w.set_resizable(resizable), } } diff --git a/src/platform/linux/wayland/window.rs b/src/platform/linux/wayland/window.rs index 216b8a4fb2..ae722759db 100644 --- a/src/platform/linux/wayland/window.rs +++ b/src/platform/linux/wayland/window.rs @@ -101,6 +101,8 @@ impl Window { frame.set_maximized(); } + frame.set_resizable(attributes.resizable); + // set decorations frame.set_decorate(attributes.decorations); @@ -198,6 +200,11 @@ impl Window { self.frame.lock().unwrap().set_max_size(dimensions); } + #[inline] + pub fn set_resizable(&self, resizable: bool) { + self.frame.lock().unwrap().set_resizable(resizable); + } + #[inline] pub fn set_cursor(&self, _cursor: MouseCursor) { // TODO