Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!csc.ti.com!ti-csl!m2.csc.ti.com!hcmv2!markus From: markus@hcmv2.ti.com (Markus Richardson) Newsgroups: comp.windows.x.motif Subject: Re: Changing the pointer in ALL windows Message-ID: Date: 30 Apr 91 20:18:52 GMT References: <1991Apr28.014058.16034@engin.umich.edu> Sender: usenet@csc.ti.com (USENET News System) Organization: Texas Instruments Inc, VLSI Design Lab, Dallas, TX Lines: 76 Nntp-Posting-Host: hcmv2.csc.ti.com 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! I chose to create an InputOnly window with its pointer defined as a stopwatch. By mapping the window, all user-generated input events can be safely ignored until the processing is completed upon which the window is unmapped. But I get the same behavior as Eric is having :-( I have even tried to force it to be the top window in the stacking order as well as setting the override_redirect window resource to True. Both attempts made no difference. Here is [the perintent portions of] my code: To initialize the shells and InputOnly window and cursor: ... [ the first top level shell created here ] ... XSetWindowAttributes attr; attr.override_redirect = True; Dimension x, y, width, height; argcnt = 0; XtSetArg(args[argcnt], XmNx, &x); argcnt++; XtSetArg(args[argcnt], XmNy, &y); argcnt++; XtSetArg(args[argcnt], XmNwidth, &width); argcnt++; XtSetArg(args[argcnt], XmNheight, &height); argcnt++; XtGetValues(Top_app_shell, args, argcnt); Wait_window = XCreateWindow(Main_display, Main_window, x, y, width, height, 0, 0, InputOnly, DefaultVisualOfScreen(Main_screen), CWOverrideRedirect, &attr); Wait_cursor = XCreateFontCursor(Main_display, XC_watch); XDefineCursor(Main_display, Wait_window, Wait_cursor); ... [ other top level application shells created here ] ... And when extended processing is about to occur: XMapRaised(Main_display, Wait_window); XmUpdateDisplay(Top_widget); And when processing is completed: XUnmapWindow(Main_display, Wait_window); It works fine when the mouse pointer is in the "Wait_window", but the pointer changes back when in other top level shells. Are the other shell windows overriding the XMapRaised call? I thought it might be mwm getting in the way, so I ran it with no wm but no difference. Thanks for any pointers :-) In case it matters, I'm running Motif v1.1.1 -- Markus R. (markus@ti.com) "If people built houses the way we write programs, the first woodpecker would wipe out civilization" _The Cuckoo's Egg_ by Cliff Stoll