|XP is just a number|
Grabbing that mouse cursor in X11by strredwolf (Chaplain)
|on Apr 23, 2010 at 01:43 UTC||Need Help??|
strredwolf has asked for the
wisdom of the Perl Monks concerning the following question:
MY KINGDOM FOR A PIXBUF! :D
I'm building a Perl script that follows the mouse in one screen, snapshots the area, and puts it into a window on a separate screen. I got 99% of it written using Gtk2 and tested; it's working great except for one thing.
In X11, the mouse cursor doesn't get grabbed.
Is there any way to grab the mouse cursor? Anyone try calling the XFIXES extension of X11 from Perl? If I can grab the data I can glue it into the screen and smack it to the destination window.
EDIT: Here's my code for 'mousetracker.pl'. It grabs from the current screen. If you give it an argument (like 192.168.1.8:0, exactly like the DISPLAY env variable), it'll display it on that screen you gave. I have it going from my Linux box to my Mac running X11.app.
Information doesn't want to be free. It wants to be feline.