Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

fix(flow): make idle Flow pill window click-through on Windows (#929, #711)

unknowndbe54bea2bda
diff --git a/windows/src-tauri/src/flow/pill.rs b/windows/src-tauri/src/flow/pill.rs
index 5aded2a6..26a197ea 100644
--- a/windows/src-tauri/src/flow/pill.rs
+++ b/windows/src-tauri/src/flow/pill.rs
@@ -119,6 +119,7 @@ pub fn setup(app: &AppHandle) {
}
match builder.build() {
Ok(win) => {
+ let _ = win.set_ignore_cursor_events(true);
if !platform::prepare_pill_window(&win, mode) {
let _ = win.destroy();
mode = DesktopMode::Off;
@@ -248,6 +249,7 @@ fn show(app: &AppHandle, pill: &Pill, visible: bool) {
DesktopMode::Poll => {
if !visible {
let _ = win.set_position(PhysicalPosition::new(PARKED.0, PARKED.1));
+ let _ = win.set_ignore_cursor_events(true);
}
let (lock, cv) = &pill.poll;
*lock.lock().unwrap() = visible;
@@ -335,13 +337,18 @@ pub fn set_hot(app: &AppHandle, rects: Vec<(f64, f64, f64, f64)>) {
/// mouse only over the pill and its bubble.
fn spawn_poll(app: AppHandle, pill: Arc<Pill>) {
std::thread::spawn(move || {
- let mut ignoring: Option<bool> = None;
+ let mut ignoring: Option<bool> = Some(true);
loop {
{
let (lock, cv) = &pill.poll;
let mut on = lock.lock().unwrap();
while !*on {
- ignoring = None;
+ if ignoring != Some(true) {
+ ignoring = Some(true);
+ if let Some(win) = window(&app) {
+ let _ = win.set_ignore_cursor_events(true);
+ }
+ }
on = cv.wait(on).unwrap();
}
}
diff --git a/windows/src-tauri/src/platform/windows.rs b/windows/src-tauri/src/platform/windows.rs
index e850ae55..2b253f98 100644
--- a/windows/src-tauri/src/platform/windows.rs
+++ b/windows/src-tauri/src/platform/windows.rs
@@ -636,6 +636,7 @@ pub fn layer_display(_island: &WebviewWindow, _mochi: &WebviewWindow) -> Option<
pub fn prepare_pill_window(win: &WebviewWindow, _mode: super::DesktopMode) -> bool {
make_non_activating(win);
+ let _ = win.set_ignore_cursor_events(true);
true
}