Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/platform/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}

Expand Down
7 changes: 7 additions & 0 deletions src/platform/linux/wayland/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ impl Window {
frame.set_maximized();
}

frame.set_resizable(attributes.resizable);

// set decorations
frame.set_decorate(attributes.decorations);

Expand Down Expand Up @@ -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
Expand Down