(M)  s i s t e m a   o p e r a c i o n a l   m a g n u x   l i n u x ~/ · documentação · suporte · sobre

  Next Previous Contents

5. Technical discussion

Is it possible to write a X program that enlarges cursors automatically?

(Partial) solution 1

Use the XTestCompareCursor from the XTEST extension. For all windows that the mouse pointer enters compare the cursor of this window with a set of `known' cursors (e. g. from the cursor font). If the cursor is found, replace it with an enlarged version, otherwise either leave it alone or substitute a standard cursor. This will only work where the XTest extension is available.

Solution 2

Write a proxy X server that relays all client requests unchanged to the real X server, except that it intercepts all requests corresponing to the XCreate*Cursor Xlib functions. XCreate*Cursor requests should be modified to use an enlarged cursor.

This proxy server simulates a new display, e. g. :1. All clients that connect to this display (e. g. xterm -display :1) are displayed on the real server (normally :0) and their mouse cursors are enlarged automatically. The mouse cursors of clients that connect to :0 will remain unchanged.


Next Previous Contents