Skip to content

BanishMouseCursor

Bakkeby edited this page Feb 27, 2024 · 3 revisions

The BanishMouseCursor functionality allows for the mouse cursor to automatically hide when the user uses the keyboard.

This gives behaviour similar to what xban offers.

When the mouse cursor is hidden the position will remain as-is unless artificially moved by the Warp functionality. The mouse cursor will automatically be shown when moved.

The functionality depends on two optional libraries:

  • libxfixes
  • libxi

To enable this dusk will need to be compiled with these libraries. This is accomplished by uncommenting the corresponding lines in config.mk:

# Optional dependency on libxi for mouse related features
#HAVE_LIBXI = -DHAVE_LIBXI=1
#XINPUTLIBS = -lXi
#XFIXESLIBS = -lXfixes

Without the above the BanishMouseCursor functionality will have no effect.

The benefit of having this functionality integrated into the window manager is that it allows for a more seamless integration for example in relation to cursor warping or other operations involving the mouse.

Additionally enter notify events will be ignored while the cursor is hidden.

Disclaimer: It should be noted that while the cursor graphics can be hidden it is not possible to remove the cursor completely. As such things that react to the presence of a mouse cursor will still do so; one example being browsers and tool tips that may show up under the mouse cursor when scrolling on a web page. It is possible to work around this by artificially moving the mouse cursor to one of the corners of the screen when hidden. Unfortunately this will introduce other issues. Refer to the BanishMouseCursorToCorner functionality for more details on that.

Back to Functionality.

Clone this wiki locally