mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 23:00:05 -04:00
wayland: properly handle 'decorated' option.
This commit is contained in:
@@ -257,6 +257,7 @@ impl Window {
|
|||||||
shell_surface.set_fullscreen(ShellFullscreenMethod::Default, Some(&monitor.output));
|
shell_surface.set_fullscreen(ShellFullscreenMethod::Default, Some(&monitor.output));
|
||||||
ShellWindow::Plain(shell_surface)
|
ShellWindow::Plain(shell_surface)
|
||||||
} else {
|
} else {
|
||||||
|
if builder.decorations {
|
||||||
ShellWindow::Decorated(match DecoratedSurface::new(
|
ShellWindow::Decorated(match DecoratedSurface::new(
|
||||||
surface,
|
surface,
|
||||||
w as i32,
|
w as i32,
|
||||||
@@ -267,6 +268,9 @@ impl Window {
|
|||||||
Ok(s) => s,
|
Ok(s) => s,
|
||||||
Err(_) => return Err(CreationError::NotSupported)
|
Err(_) => return Err(CreationError::NotSupported)
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
ShellWindow::Plain(wayland_context.shell.get_shell_surface(surface))
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let context = {
|
let context = {
|
||||||
|
|||||||
Reference in New Issue
Block a user