aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVictor Berger <victor.berger@m4x.org>2015-08-16 16:21:26 +0200
committerVictor Berger <victor.berger@m4x.org>2015-08-16 16:21:26 +0200
commitf7f52c21a02bdd26889093427adb9659b5bcf8dc (patch)
treedb1e3b8306e4cce9dba5fc7b3fb00bb2c18c4251 /src
parent1cea6a65a44dee4d0bd85a35f8ac531017c4951f (diff)
downloadglutin-f7f52c21a02bdd26889093427adb9659b5bcf8dc.tar.gz
glutin-f7f52c21a02bdd26889093427adb9659b5bcf8dc.zip
wayland: properly handle 'decorated' option.
Diffstat (limited to 'src')
-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 = {