Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!ucsd!ucbvax!KITCHEN.BELLCORE.COM!aw From: aw@KITCHEN.BELLCORE.COM (Andrew Wason, aw@cellar.bae.bellcore.com) Newsgroups: comp.windows.x.motif Subject: Re: cursor fonts Message-ID: <9011281455.AA18741@bellcore.bellcore.com> Date: 28 Nov 90 14:50:04 GMT References: <1019@pcsbst.pcs.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 54 eru!hagbard!sunic!mcsun!unido!pcsbst!aida!horst@bloom-beacon.mit.edu (horst ker n) writes: > > > In article <3206@exodus.Eng.Sun.COM> argv@turnpike.Eng.Sun.COM (Dan Heller) w > rites: > >In article <1003@pcsbst.pcs.com> horst@aida.pcs.com (horst kern) writes: > >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()) > > The problem seems to grow instead of being solved. Some e-mail from > Mike Websters (my thanks to him) told me to map the InputOnly window > on top of the one that I want it. You think it should be the whole > screen. As you mention, it's an easy way - so far. It's of course not > the best way, as people might have windows to other machines which are > not at all affected by the absence of one particular main loop. Even > on one machine they might want to continue with another xterm while > that machine is also busy with an application. Even though the window is as big as the screen, it will be clipped by its parent window (the window of your toplevel widget), so it won't affect any other applications. It needs to be as big as the screen in case the user enlarges the window while it is busy (exposing unbusy areas). Here's some sample code: unsigned long valuemask; XSetWindowAttributes attributes; /* * Ignore device events while the busy cursor is displayed. */ valuemask = CWDontPropagate | CWCursor; attributes.do_not_propagate_mask = (KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask); attributes.cursor = XCreateFontCursor(XtDisplay(toplevel), XC_watch); /* * The window will be as big as the display screen, and clipped by * it's own parent window, so we never have to worry about resizing. */ XCreateWindow(XtDisplay(toplevel), XtWindow(toplevel), 0, 0, WidthOfScreen(XtScreen(toplevel)), HeightOfScreen(XtScreen(toplevel)), (unsigned int) 0, CopyFromParent, InputOnly, CopyFromParent, valuemask, &attributes); Andrew -------------------------------------------------------------------------------- Andrew Wason Bell Communications Research aw@cellar.bae.bellcore.com Piscataway, NJ bellcore!cellar!aw