LinuxOutsideClickWatcher

class LinuxOutsideClickWatcher(windowSupplier: () -> Window?, onOutsideClick: () -> Unit) : AutoCloseable

LinuxOutsideClickWatcher: X11/XWayland implementation that detects a left-click anywhere, and if it is outside the supplied window (and not on the tray icon area), invokes a callback.

Uses JNI via LinuxNativeBridge for X11 calls (no JNA dependency).

Notes:

  • Requires X11/XWayland (DISPLAY must be set). Will no-op on Wayland-only sessions without XWayland.

  • Polls with XQueryPointer at ~60 Hz, reading Button1Mask for "left pressed".

Constructors

Link copied to clipboard
constructor(windowSupplier: () -> Window?, onOutsideClick: () -> Unit)

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()