Merge pull request #39 from wash2/fix-unwrap

This commit is contained in:
Victoria Brekenfeld 2022-09-22 11:47:10 +02:00 committed by GitHub
commit 9c993d3b41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,12 +47,14 @@ impl Shell {
}
let pos = pointer.current_location();
let output = workspace
let output = match workspace
.space
.outputs_for_window(&window)
.into_iter()
.find(|o| o.geometry().contains(pos.to_i32_round()))
.unwrap();
.find(|o| o.geometry().contains(pos.to_i32_round())) {
Some(o) => o,
None => return,
};
let mut initial_window_location = workspace.space.window_location(&window).unwrap();
let output = match &window.toplevel() {