From 62bf4b1ccd3826b7e729e01748d82de92489f6eb Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 21 Sep 2022 13:51:59 -0400 Subject: [PATCH] fix: return if output is none --- src/shell/grabs.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shell/grabs.rs b/src/shell/grabs.rs index 38b13687..0f9552f4 100644 --- a/src/shell/grabs.rs +++ b/src/shell/grabs.rs @@ -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() {