How can I catch all mouse events?

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Mon Jun 2 12:06:09 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am trying to do something very simple: change the default cursor
whenever a mouse button is pressed down, and change back when the button
is released.  For example, a normally black cursor graphic might be
switched out for one with a white fill to indicate that a mouse button is
depressed.  This would be useful for audiences watching a demonstration on
a projector, or even looking over a friend's shoulder if you can't hear
the audible click.  There are also obvious applications to MPX, but that
is more advanced.

Question 1: How would you implement this?

After reading everything I can find on this subject (I am an X novice), I
have come to the conclusion that standard X11 does not provide any
mechanism for sending a copy of all input events to one client, regardless
of which window contains the pointer.  However, it appears that the RECORD
extension provides the facility that I am looking for.  I added the line

Load "record"

to my xorg.conf, and my Xorg.0.log now shows a line

(II) Loading extension RECORD

but xdpyinfo doesn't show RECORD in its list of loaded extensions.  My
code, using Xlib, similarly fails because the RECORD extension is not present.

Question 2: Why isn't RECORD loading?  What do I need to do to get RECORD
to load for real?
(This is on an OLPC XO, running a slightly modified Fedora 7 and
xorg-server 1.4.0.)

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhERKEACgkQUJT6e6HFtqRZnwCeJzduy1AezLtEUlNFvxzuO+c9
P8sAn25uTY+KqWcJLEZBNVhNB6H6hFws
=taY5
-----END PGP SIGNATURE-----



More information about the xorg mailing list