Files
claude-code-usage-bubble/src/platform/macos.rs
T
tiennm99 8d7a07b237 feat: hide the bubbles while another app is fullscreen
A 1.5 s thread asks the platform whether the foreground window is a
fullscreen window of another process and feeds the result through the
visibility state machine. Windows keeps the proven evaluation with an
own-process check in place of the bubble class check; Linux reads the
EWMH active window state over X11; native Wayland and macOS report false.
2026-10-21 15:58:02 +07:00

17 lines
769 B
Rust

//! macOS-only helpers. The macOS build is a compile target for now; these
//! stubs keep the portable callers working until the platform is finished.
/// Whether the primary mouse button is held. Always false for now, so a
/// drag ends 250 ms after the last move; `NSEvent.pressedMouseButtons`
/// would let a paused drag keep the debounce armed, as on X11.
pub fn primary_button_down() -> bool {
false
}
/// Whether a fullscreen window of another app is frontmost. Always false
/// for now; `CGWindowListCopyWindowInfo` with the on-screen window list
/// (layer 0, bounds covering a display, owner PID not ours) would answer it.
pub fn foreground_is_fullscreen() -> super::FullscreenCheck {
super::FullscreenCheck::new(false, "not implemented on macOS")
}