On Wed, 23 Aug 2006, at 22:36:35 (+0200), Joey Hess wrote: > Marc-Jano Knopp wrote: > > When running > > > > unclutter --help > > > > it displays, among other options: > > > > -visible ignore visibility events > > > > This option, however, is not documented in the manpage, and is not > > self-explanatory for someone not familiar with X11 internals. > > Such as myself. :-)
Oh. :-) As far as I (also not familiar with X11 internals) understood, the X11 server sends a notification to unclutter's transparent 1x1 subwindow under the invisible cursor (so this doesn't apply if "unclutter -grab" is used), if the window's visibility changed state (which can be VisibilityUnobscured, VisibilityPartiallyObscured, and VisibilityFullyObscured). Usually, InputOnly windows (which the unclutter window is created as, since it doesn't need to display anything) should not get VisibilityEvents at all: ,----[ Xlib - C Language X Interface: 10.10.10. VisibilityNotify Events ]--- | | However, this event is never generated for windows whose class | is InputOnly. | `----[ /usr/share/X11/doc/hardcopy/X11/xlib.PS.gz, package "xspecs" ]--- But despite this class, some servers generate this event when the subwindow is mapped, and report varying visibility states. For these servers, you have to use "-visible", as otherwise the cursor would never be hidden, since its subwindow would immediately be destroyed due to the VisibilityNotify event. Why the authors don't simply always ignore visibility events is beyond me. I couldn't think of any situation where evaluation of the visibility state would be useful, but as I said: IANAXE (I am not an X11 expert) and have never written a program using Xlib. All of the above I inferred from both the Xlib manual and the unclutter source code. I might suffer from dyslexia or ADS, and I can't code anyway, so better check twice. > If you know what it does, I'll document it on the man page. For now, you could write -visible Ignore visibility events (does not apply to -grab). If the cursor never gets hidden, despite a generous -jitter value, try this option. to the manpage. No liability assumed, though, I could be totally wrong. And while you're at it, you could fix the various typos in the help text (dont -> don't etc.). :-) Gruß Marc-Jano