@@ -335,8 +335,8 @@ impl WmState { |
| 335 | for w in &windows { | 335 | for w in &windows { |
| 336 | let cx = w.x + w.width / 2.0; | 336 | let cx = w.x + w.width / 2.0; |
| 337 | let cy = w.y + w.height / 2.0; | 337 | let cy = w.y + w.height / 2.0; |
| 338 | - let mi = super::monitor::index_at_point(&self.monitors, cx, cy) | 338 | + let mi = |
| 339 | - .unwrap_or(original_focused); | 339 | + super::monitor::index_at_point(&self.monitors, cx, cy).unwrap_or(original_focused); |
| 340 | self.focused_monitor = mi; | 340 | self.focused_monitor = mi; |
| 341 | self.add_window_to_active( | 341 | self.add_window_to_active( |
| 342 | &w.id, | 342 | &w.id, |
@@ -1344,9 +1344,7 @@ impl WmState { |
| 1344 | crate::platform::workspace_observer::frontmost_regular_application_pid() | 1344 | crate::platform::workspace_observer::frontmost_regular_application_pid() |
| 1345 | == Some(pid) | 1345 | == Some(pid) |
| 1346 | }); | 1346 | }); |
| 1347 | - if !app_already_frontmost | 1347 | + if !app_already_frontmost && let Some(pid) = target_pid { |
| 1348 | - && let Some(pid) = target_pid | | |
| 1349 | - { | | |
| 1350 | let app_ref = | 1348 | let app_ref = |
| 1351 | unsafe { objc2_application_services::AXUIElement::new_application(pid) }; | 1349 | unsafe { objc2_application_services::AXUIElement::new_application(pid) }; |
| 1352 | let frontmost_key = | 1350 | let frontmost_key = |
@@ -3398,11 +3396,7 @@ fn should_auto_float(subrole: &str, ax_ref: &AXUIElement) -> bool { |
| 3398 | | 3396 | |
| 3399 | if matches!( | 3397 | if matches!( |
| 3400 | subrole, | 3398 | subrole, |
| 3401 | - "AXDialog" | 3399 | + "AXDialog" | "AXSystemDialog" | "AXSheet" | "AXFloatingWindow" | "AXSystemFloatingWindow" |
| 3402 | - | "AXSystemDialog" | | |
| 3403 | - | "AXSheet" | | |
| 3404 | - | "AXFloatingWindow" | | |
| 3405 | - | "AXSystemFloatingWindow" | | |
| 3406 | ) { | 3400 | ) { |
| 3407 | return true; | 3401 | return true; |
| 3408 | } | 3402 | } |