Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!veritas!amdcad!sun!exodus!argv From: argv@turnpike.Eng.Sun.COM (Dan Heller) Newsgroups: comp.windows.x.motif Subject: Re: cursor fonts Message-ID: <3206@exodus.Eng.Sun.COM> Date: 21 Nov 90 00:12:24 GMT References: <1003@pcsbst.pcs.com> Sender: news@exodus.Eng.Sun.COM Organization: O'Reilly && Associates Lines: 33 In article <1003@pcsbst.pcs.com> horst@aida.pcs.com (horst kern) writes: > There was a recent posting asking how to change the cursor font to the > watch cursor. Recent? > Of course the problem implies the question "how to change it back to > the original font when the work is done". It's not just that, but you don't want to process input while the cursor is that font. further, you don't want anything that may have happened (mouse buttons or keyboard events) while the cursor was changed to sudedenly "take action" when you are done. I've found that the easiest thing to do (so far) is to create a single InputOnly window (you can use XCreateWindow() for this) that goes over the entire screen (DefaultWidget() and DefaultHeight()) (don't forget to call XMapWindow()) and call XtGrabPointer() setting the _cursor_ parameter accordingly. When you're done, ungrab the pointer, unmap the input-only window and you should be done. You never change your cursor using this method -- you just add a new window that has the cursor you want.* Note; you have to do some XtAppProcessEvent() calls to make sure that your window is mapped, or nothing will happen :-(. It would sure be nice if one could communciate with mwm to do this for you. -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.