wayland: properly handle 'decorated' option.

This commit is contained in:
Victor Berger 2015-08-16 16:21:26 +02:00
parent 1cea6a65a4
commit f7f52c21a0

View file

@ -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 = {