fix: return if output is none

This commit is contained in:
Ashley Wulber 2022-09-21 13:51:59 -04:00
parent e1894ef425
commit 62bf4b1ccd
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

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() {