Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(desktop-gpui): use the removal result when leaving keyboard mode

Richie McIlroy050129f57050
diff --git a/apps/desktop-gpui/src/ui/keyboard_nav.rs b/apps/desktop-gpui/src/ui/keyboard_nav.rs
index 3692c0b28..68e194961 100644
--- a/apps/desktop-gpui/src/ui/keyboard_nav.rs
+++ b/apps/desktop-gpui/src/ui/keyboard_nav.rs
@@ -58,13 +58,10 @@ pub fn active(window: &Window, cx: &App) -> bool {
}
pub fn pointer_used(window: &mut Window, cx: &mut App) {
- if !active(window, cx) {
- return;
+ let id = window.window_handle().window_id();
+ if cx.has_global::<KeyboardWindows>() && cx.global_mut::<KeyboardWindows>().0.remove(&id) {
+ window.refresh();
}
- cx.global_mut::<KeyboardWindows>()
- .0
- .remove(&window.window_handle().window_id());
- window.refresh();
}
/// Route Tab in `window` to focus navigation. `blocked` lets the owner keep