From f7f52c21a02bdd26889093427adb9659b5bcf8dc Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sun, 16 Aug 2015 16:21:26 +0200 Subject: wayland: properly handle 'decorated' option. --- src/api/wayland/mod.rs | 24 ++++++++++++++---------- 1 file 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 = { -- cgit v1.2.3