aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/wayland/mod.rs24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/api/wayland/mod.rs b/src/api/wayland/mod.rs
index 12a909d..ba1931b 100644
--- a/src/api/wayland/mod.rs
+++ b/src/api/wayland/mod.rs
@@ -257,16 +257,20 @@ impl Window {
shell_surface.set_fullscreen(ShellFullscreenMethod::Default, Some(&monitor.output));
ShellWindow::Plain(shell_surface)
} else {
- ShellWindow::Decorated(match DecoratedSurface::new(
- surface,
- w as i32,
- h as i32,
- &wayland_context.registry,
- Some(&wayland_context.seat)
- ) {
- Ok(s) => s,
- Err(_) => return Err(CreationError::NotSupported)
- })
+ if builder.decorations {
+ ShellWindow::Decorated(match DecoratedSurface::new(
+ surface,
+ w as i32,
+ h as i32,
+ &wayland_context.registry,
+ Some(&wayland_context.seat)
+ ) {
+ Ok(s) => s,
+ Err(_) => return Err(CreationError::NotSupported)
+ })
+ } else {
+ ShellWindow::Plain(wayland_context.shell.get_shell_surface(surface))
+ }
};
let context = {