diff options
author | Victor Berger <victor.berger@m4x.org> | 2015-08-16 16:21:26 +0200 |
---|---|---|
committer | Victor Berger <victor.berger@m4x.org> | 2015-08-16 16:21:26 +0200 |
commit | f7f52c21a02bdd26889093427adb9659b5bcf8dc (patch) | |
tree | db1e3b8306e4cce9dba5fc7b3fb00bb2c18c4251 /src/api/wayland | |
parent | 1cea6a65a44dee4d0bd85a35f8ac531017c4951f (diff) | |
download | glutin-f7f52c21a02bdd26889093427adb9659b5bcf8dc.tar.gz glutin-f7f52c21a02bdd26889093427adb9659b5bcf8dc.zip |
wayland: properly handle 'decorated' option.
Diffstat (limited to 'src/api/wayland')
-rw-r--r-- | src/api/wayland/mod.rs | 24 |
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 = { |