Update sctk to 0.11.0

This commit is contained in:
Kirill Chibisov 2020-08-30 19:31:14 +03:00 committed by Victor Berger
parent 8a81be7c0a
commit b88f48fbc0
2 changed files with 23 additions and 18 deletions

View file

@ -10,8 +10,8 @@ license = "MIT"
keywords = ["clipboard", "wayland"]
[dependencies]
sctk = { package = "smithay-client-toolkit", version = "0.10", default-features = false }
sctk = { package = "smithay-client-toolkit", version = "0.11", default-features = false }
wayland-client = { version = "0.27", features = ["dlopen"] }
[dev-dependencies]
sctk = { package = "smithay-client-toolkit", version = "0.10"}
sctk = { package = "smithay-client-toolkit", version = "0.11"}

View file

@ -41,11 +41,15 @@ fn main() {
let mut dimentions = (320u32, 240u32);
// Create surface
let surface = env.create_surface();
let surface = env.create_surface().detach();
// Create window
let mut window = env
.create_window::<ConceptFrame, _>(surface, dimentions, move |event, mut dispatch_data| {
.create_window::<ConceptFrame, _>(
surface,
None,
dimentions,
move |event, mut dispatch_data| {
// Get our dispath data
let dispatch_data = dispatch_data.get::<DispatchData>().unwrap();
@ -61,7 +65,8 @@ fn main() {
if should_replace_event {
dispatch_data.pending_frame_event = Some(event);
}
})
},
)
.expect("failed to create a window.");
// Set title and app id