Commit graph

7 commits

Author SHA1 Message Date
Breadway
81319dd584 can't be bothered writing a commit message 2026-05-24 18:57:01 +08:00
Breadway
7df0003c2c breadbox: replace backdrop window with full-screen single window
The backdrop approach failed because a GTK4 window with no child widget
gets an empty Wayland input region, so pointer events passed straight
through it rather than being delivered to the GestureClick handler.

Replace with a single full-screen window (anchored to all 4 edges,
transparent background). The launcher UI (vbox) is 700 px wide,
halign=Center, valign=Start — visually identical to before. A
GestureClick on the window closes it when (x,y) falls outside the
vbox's allocation rectangle; clicks inside the vbox reach child widgets
normally and don't trigger the close path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 12:36:18 +08:00
Breadway
afd1f8f9e2 breadbox: fix spurious close via transparent backdrop window
EventControllerFocus::connect_leave was firing whenever the pointer left
the launcher surface because Hyprland's focus-follows-mouse hands keyboard
focus back to the window under the cursor (OnDemand mode).

Fix: introduce a full-screen transparent backdrop window at Layer::Top.
The launcher sits at Layer::Overlay (above it), so the backdrop never
intercepts launcher clicks. Clicking anywhere outside the launcher hits
the backdrop and closes both windows via a shared Rc<dyn Fn()> callback.
The launcher returns to KeyboardMode::Exclusive so the compositor can no
longer steal focus on pointer leave. EventControllerFocus is removed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 12:31:14 +08:00
Breadway
f665320634 breadbox: fix unfocus-close, Enter, and arrow key navigation
- KeyboardMode::Exclusive → OnDemand: with Exclusive the compositor
  never sends wl_keyboard::leave, so EventControllerFocus::connect_leave
  never fires. OnDemand lets Hyprland hand focus back on click-outside.
- Move EventControllerKey from search to window, capture phase: bubble
  phase on SearchEntry let its own handlers consume Enter and arrows
  first. Capture phase on the window intercepts all keys before any
  widget sees them, so Enter/Up/Down/Esc always reach our handler.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 12:17:56 +08:00
Breadway
ec07b82747 breadbox: steal focus on open, close on unfocus
Switch KeyboardMode to Exclusive so Hyprland hands keyboard focus to
breadbox immediately on creation. Add an EventControllerFocus on the
window that calls close() the moment focus leaves (click outside,
alt-tab, compositor focus change, etc.).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 12:12:51 +08:00
Breadway
30e40ec54f breadbox: replace wofi with native GTK4 layer-shell UI
Remove the wofi subprocess entirely. The launcher now renders its own
Wayland overlay window via gtk4 + gtk4-layer-shell: a SearchEntry at
the top with live fuzzy filtering, a ListBox of results below, and
keyboard navigation (Enter/Esc/arrows). Toggle (keybind press while
open closes it) is handled via a PID file in $XDG_RUNTIME_DIR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 11:36:29 +08:00
Breadway
d94a00d982 breadbox: fast Rust application launcher for wofi
Zero-dependency Rust rewrite of the breadboard launcher. Parses
.desktop files in-process (no awk subprocesses), builds a tab-separated
cache for wofi dmenu, and supports stale-while-revalidate background
rebuilds. Apps-only for now; icon support to be added later.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 11:14:16 +08:00