generated from eblume/project-template
fix(quickadd): return focus to the previous app when the ⌘' popover hides #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/quickadd-focus-return"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The global ⌘' quick-add popover (
heph-quickadd) is a borderless, transparent, always-on-top macOS accessory window. It hides via winit'sViewportCommand::Visible(false), which orders the window out visually but leavesheph-quickaddthe active application. As a result, after creating a task (or pressing Esc / toggling off):Fix
Hide at the application level via
NSApplication.hide:, which fully orders our windows out and activates the next app in line — exactly the previously focused app. On re-show,unhide:clears the app-level hidden flag before the existing viewportFocuscommand makes the field key again.app_yield_focus()(inhide()) andapp_take_focus()(inshow()); both are no-ops off macOS.objc2/objc2-app-kit, pinned to the0.6/0.3lineglobal-hotkeyalready pulls in — cargo unifies to one copy, no net-new crate versions.Testing
cargo build -p heph-quickadd+cargo clippy -p heph-quickaddclean🤖 Generated with Claude Code