Path: utzoo!attcan!uunet!cs.utexas.edu!usc!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: Widget with more than one window Message-ID: <8906291502.AA02074@LYRE.MIT.EDU> Date: 29 Jun 89 15:02:38 GMT References: <8906232004.AA05642@kentmath.kent.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 22 Date: Fri, 23 Jun 89 16:04:13 EDT From: doleh%kent.edu@relay.cs.net I am trying to create a widget with more than one window. I create subwindows of the XtWindow(w). Everything was fine except when I used XtDispatch(event), where event->window is one of the subwindows the event is not seen by the widget. Xt only knows how to dispatch input from one window per widget. If you want Xt to dispatch input from multiple windows then each of them must be made into a widget. You can still create a compound or composite widget to transparently instantiate the subwidgets for the application, keeping the internal implementation opaque. Alternatively, if you're only interested in "user input" from the sub-windows, you could add the event handler to the parent, and not do SelectInput on the subwindows, thereby allowing the server to propogate the events to a window known to Xt. Once the handler gets the event, you can use the child field of the event to distinguish the particular subwindow.