mirror of
https://github.com/tiennm99/claude-code-usage-bubble.git
synced 2026-10-27 20:18:16 +00:00
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.
17 lines
769 B
Rust
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")
|
|
}
|