Path: utzoo!attcan!uunet!cs.utexas.edu!usc!bloom-beacon!ARISIA.XEROX.COM!janssen From: janssen@ARISIA.XEROX.COM (Bill Janssen) Newsgroups: comp.windows.x Subject: Re: help (with a popup prompt design) Message-ID: Date: 22 Aug 89 18:40:38 GMT References: <8908221345.AA02511@god.goldhill.com> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 40 > *Excerpts from mail: 22-Aug-89 help (with a popup prompt d..* > *phil@goldhill.com (891)* > The fact that conditions arise with varying degrees of severity indicates > that atleast two types of popups are needed and should be planned for > when building and designing the UI for an application. Yes, I'm not really as dogmatic as I tend to sound on that issue. Though I still wouldn't use the pop-up mechanism to block, but would rather have the `block-input-from-user' function packaged by itself, independent of the pop-ups, so that the ``severe'' case you mention would be handled by: BlockUserInput(); PopUpMessage ("Environment trashed. Unwinding."); rather than PopUpMessageBlocking(""Environment trashed. Unwinding."); Note that BlockUserInput() only blocks events that come from the user, such as keystrokes and mouse-strokes. The Expose events that cause the pop-up to be painted go through just as they normally would. A tougher trick is to block input only on windows that were created *before* the critical event occurred, but not on later-created windows. For this, some kind of stack in the event-dispatcher is needed. The timestamp in the MapNotify event of a newly-created window could be used, or the client could use XSendEvent to send an event through that window, and use that timestamp, when the window is registered with the event-dispatcher. Then BlockUserInput() would push a timestamp (where does it get it? from the server again?) onto an input-blocking stack, and only user events on windows with later timestamps than the head of the stack would be allowed to dispatch to their windows' event handlers. Bill -- Bill Janssen janssen.pa@xerox.com (415) 494-4763 Xerox Palo Alto Research Center 3333 Coyote Hill Road, Palo Alto, California 94304