Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: How do I block X events? Message-ID: <9011180508.AA04152@Larry.McRCIM.McGill.EDU> Date: 18 Nov 90 05:08:07 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 33 >> I am writing an X application [which] has to perform a >> computationally intensive task from time to time, and I'd like to be >> able to block the user interface while this is going on. Ideally I >> want to >> a) Display an hourglass cursor over the whole application >> b) Ignore any mouse/keyboard events until the operation is >> complete. > Create an InputOnly window big enough to cover the entire appliction. Note that this window should be a child of your toplevel window, not a new child of the root. Also, if the application creates multiple children of the root, you need to do this for each one. > Set up the do_not_propagate_mask on this window so that no no events > are propagated; this takes vare of b). This doesn't take care of keyboard events when the pointer is not in the window. (This can happen when the window manager is not using PointerRoot focus, or when it is but is forwarding keystrokes with XSendEvent.) > Set the cursor of this window to be an hourglass cursor; this takes > care of a). Yes. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu