Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!agate!ucbvax!BAE.BELLCORE.COM!aw From: aw@BAE.BELLCORE.COM (Andrew Wason) Newsgroups: comp.windows.x.motif Subject: Re: Changing the pointer in ALL windows Message-ID: <9105011333.AA26591@bellcore.bellcore.com> Date: 1 May 91 13:33:00 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 63 agate!bionet!uwm.edu!cs.utexas.edu!csc.ti.com!ti-csl!m2.csc.ti.com!hcmv2!markus @ucbvax.Berkeley.EDU (Markus Richardson) writes: > theslim@engin.umich.edu (Eric Michael Slimko) writes: > > >I am writing a motif application which has many top-level windows. > >I would like to have the pointer change to a watch in all those windows > >to notify the user to wait. Unfotunately, it looks to me like you have > >to do a XDefineCursor using the window ID for EACH of the popup windows > >to get that to happen. Is there anyway around this? I tried using the > >toplevel widget returned from XtInitialize, but that only changes the > >pointer for that window. > > I have been fighting with this one too! Try mapping an InputOnly window on top of *all* of your toplevel windows. Give it a watch cursor. Do something like the following for all of your toplevel widgets after they are realized: typedef struct _BusyWindowRec { Window window; /* busy window */ Widget w; /* widget which needs the busy window */ } BusyWindowRec, *BusyWindow; void CreateBusyWindow(busy) BusyWindow busy; { 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 = appData.busy_cursor; /* * 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. * (well, almost never) */ busy->window = XCreateWindow(XtDisplay(busy->w), XtWindow(busy->w), 0, 0, WidthOfScreen(XtScreen(busy->w)), HeightOfScreen(XtScreen(busy->w)), (unsigned int) 0, CopyFromParent, InputOnly, CopyFromParent, valueMask, &attributes); } Andrew _______________________________________________________________________________ Andrew Wason Bell Communications Research aw@bae.bellcore.com Piscataway, NJ bellcore!bae!aw