LinuxOutsideClickWatcher

class LinuxOutsideClickWatcher(windowSupplier: () -> <Error class: unknown class>?, onOutsideClick: () -> Unit)

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.

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: () -> <Error class: unknown class>?, onOutsideClick: () -> Unit)

Functions

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