Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines From: swick@athena.mit.EDU (Ralph Swick) Newsgroups: comp.windows.x Subject: Re: Xt Intrinsics, extensions, and event handlers Message-ID: <9105301452.AA24478@lyre.MIT.EDU> Date: 30 May 91 14:52:49 GMT References: <1224@mdavcr.UUCP> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 68 I would like to know if there is any way of providing Xt Event handlers to handle events that come from X extensions. Unfortunately no, not at the present time. The event type of these events is not known until the extension is initialized, and the event cannot be selected with XSelectInput. Correct. This is only one of the difficulties involved in adding such support. The problem is that Xt doesn't seem capable of dispatching any nonmaskable events to the event handler other than GraphicsExpose, NoExpose, MappingNotify, SelectionClear, SelectionRequest, SelectionNotify, and ClientMessage Also correct. These are very explicitly specified to be the [only] events referred to by the 'nonmaskable' argument to XtAddEventHandler. Actually, MappingNotify is a mistake; see below. Shouldn't event types outside the range of the X standard protocol be considered nonmaskable events by Xt? Perhaps but that would now be a significant backwards-incompatible specification change and is therefore not acceptable. An additional difficulty is that it is not correct to assume (or require) that all extension events have usable 'window' fields. MappingNotify is the only core event that doesn't contain a window and it requires quite a bit of internal manipulation in Xt to dispatch it reasonably. An aside; rather than "fixing" the implementation to dispatch MappingNotify to all event handlers registered with nonmaskable==True, we propose to change the spec to remove this event from the 'nonmaskable' list. As of R4, it is possible to express interest in MappingNotify through the translation table mechanism and this appears adequate. My own personal belief is that full extension event support in Xt should allow a widget to register interest in any event, not just those containing windows. Extension events should also be supported both through translation tables and through the more primitive event handler mechanism. Getting events dispatched to the right place is only half the problem; the other half (and the harder one, it appears to me) is requesting them from the server in the first place. is there any possibility that this will change with X11.R5? I can pretty much guarantee that full extension event support will not appear in R5, sorry to say. No guarantees, but some "experimental" code might be included with the distribution. Looking at the sample implementation, it seems that all that would be required ... I hope I've convinced you that this is far from sufficient. Steve Furr ( furr@mda.ca ) Lesser artists borrow, great artists steal. - blatantly stolen from Igor Stravinsky and fools reinvent? :-)