getting mouse cursor themes in X to change for existing windows

Jason 'vanRijn' Kasper vR at movingparts.net
Sun Mar 20 19:05:29 PST 2005


Hi there,

I would have thought this to be a FAQ, but I haven't seen it anywhere (and 
I've looked), so I'll ask it here.

Is it technically possible to change the mouse cursor theme for an existing 
window (without having to restart X or for the change to only take effect for 
new windows)?  I asked Keith Packard and he replied with this:

<blockquote>
With recent XFixes extensions, you can actually replace cursors within the 
server on-the-fly.  The only thing you can't do is force applications to 
reload environment variables or X resources so that new cursors will use 
the new theme.
</blockquote>

It seems that this is the beginning of a solution.  And it certainly seems 
that according to http://www.freedesktop.org/Software/FixesExt, thought is 
going towards making X approach the 
taken-for-granted-but-immediately-missed-when-found-to-be-missing 
functionality that has been in Windows (and OS X, I'm assuming) for quite 
some time.  If I read this correctly, work is being done in the xorg X that 
will allow for this to be possible.  What is the plan for allowing for a 
global cursor-theme switch to be made with running client windows?  Certainly 
this won't have to involve X client code changes, right?  Maybe an xrefresh 
can be made to enforce the mouse cursor theme changes across all windows?

Also, can someone please explain how the cursor is decided upon and assigned 
to a client window?  I know that an environment variable can set it 
(XCURSOR_THEME (iirc)) and so can an xrdb entry of Xcursor.theme.  What I'm 
asking is at what time is this read and used?  X client startup only?

Can someone shed some light on this, please?  And my apologies if I'm missing 
documentation on it--please let me know if there is some!  =:)

Thanks!!


-- 

,-----------------------------------------------------------------//
| Jason 'vanRijn' Kasper ::  Numbers 6:22-26 
 `
 | All brontosauruses are thin at one end, much MUCH thicker 
 | in the middle, and then thin again at the far end.  That is 
 | the theory that I have and which is mine, and what it is too.  
 ,
| bash$ :(){ :|:&};:
`----------------------//



More information about the xorg mailing list