mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-24 02:46:33 +11:00
wayland: properly handle 'decorated' option.
This commit is contained in:
parent
1cea6a65a4
commit
f7f52c21a0
1 changed files with 14 additions and 10 deletions
|
@ -257,16 +257,20 @@ 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 {
|
||||||
ShellWindow::Decorated(match DecoratedSurface::new(
|
if builder.decorations {
|
||||||
surface,
|
ShellWindow::Decorated(match DecoratedSurface::new(
|
||||||
w as i32,
|
surface,
|
||||||
h as i32,
|
w as i32,
|
||||||
&wayland_context.registry,
|
h as i32,
|
||||||
Some(&wayland_context.seat)
|
&wayland_context.registry,
|
||||||
) {
|
Some(&wayland_context.seat)
|
||||||
Ok(s) => s,
|
) {
|
||||||
Err(_) => return Err(CreationError::NotSupported)
|
Ok(s) => s,
|
||||||
})
|
Err(_) => return Err(CreationError::NotSupported)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ShellWindow::Plain(wayland_context.shell.get_shell_surface(surface))
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let context = {
|
let context = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue