From abffa4b3f0a859d7439103100f59805804d46e55 Mon Sep 17 00:00:00 2001 From: "sorokin.oleg.edu" Date: Fri, 11 Sep 2026 11:08:37 -0700 Subject: [PATCH] Simplify canvas control focus guard for strict lint --- .../src/behavior/canvas_workspace/control.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/oa-desktop/src/behavior/canvas_workspace/control.rs b/crates/oa-desktop/src/behavior/canvas_workspace/control.rs index 6e199cca..814ba192 100644 --- a/crates/oa-desktop/src/behavior/canvas_workspace/control.rs +++ b/crates/oa-desktop/src/behavior/canvas_workspace/control.rs @@ -158,14 +158,12 @@ impl Widget for Contro if matches!( event, Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) - ) { - if !layout - .bounds() - .intersection(viewport) - .is_some_and(|bounds| cursor.is_over(bounds)) - { - state.focused = false; - } + ) && !layout + .bounds() + .intersection(viewport) + .is_some_and(|bounds| cursor.is_over(bounds)) + { + state.focused = false; } } if matches!(event, Event::Window(iced::window::Event::Unfocused)) {