Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!jade!ucbvax!dsg.csc.ti.COM!Kimbrough From: Kimbrough@dsg.csc.ti.COM (Kerry Kimbrough) Newsgroups: comp.windows.x Subject: Re: CLX question Message-ID: <2776980073-2810538@Sierra> Date: 31 Dec 87 23:21:13 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 20 Apparently, I wasn't clear about why implementing XWindowEvent/XCheckWindowEvent in CLX is clumsy. The problem is matching the given window object against an event. Do you compare it with the event's :window or with its :parent or with its :event-window? It all depends on the :event-key. Something like: (DEFUN window-event (display match-window match-event-keys handler) (process-event display #'(lambda (&rest event-keys) (LET* ((event-key (GETF event-keys :event-key)) (event-window (GETF event-keys (CASE event-key ((:configure-request ...) :parent) ((:circulate-notify ...) :event-keyword) (otherwise :window))))) (AND (EQ event-window match-window) (FIND event-key match-event-keys) (APPLY handler event-keys)))))) Servicable, but it would be cleaner and more reliable if it was always the same keyword (say, :event-window). Same goes for event dispatching, too.