home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:20757 comp.windows.x.intrinsics:709 comp.windows.x.motif:8340
- Newsgroups: comp.windows.x,comp.windows.x.intrinsics,comp.windows.x.motif
- Path: sparky!uunet!ods!chris
- From: chris@ods.com (Chris Atkins)
- Subject: Re: X/Xt/Motif Event Interleaving?
- Message-ID: <1993Jan5.151408.3422@ods.com>
- Followup-To: comp.windows.x,comp.windows.x.intrinsics,comp.windows.x.motif
- Organization: Optical Data Systems, Inc.
- X-Newsreader: TIN [version 1.1 PL8]
- References: <BUZZ.93Jan4135708@lion.bear.com>
- Date: Tue, 5 Jan 1993 15:14:08 GMT
- Lines: 32
-
- Buzz Moschetti (buzz@bear.com) wrote:
- : We are trying to create a very simple "drag-n-drop" type UI. All widgets
- : that can be dragged or dropped on will live in the same container widget
- : (xmFormWidgetClass). Thus, we thought it would be possible to add event
- : handlers to all child widgets as follows:
-
- : XtAddEventHandler(widget,
- : EnterWindowMask |
- : ButtonPressMask | ButtonReleaseMask | Button1MotionMask,
- : FALSE, my_event_proc, client_data);
-
- : Assume we have two button widgets. Clicking on and dragging either widget
- : correctly hits my_event_proc() with event->type set accordingly, likewise
- : for entering the widgets.
-
- : What we thought would happen is while, say, widget 1 was dragged over
- : widget 2, the latter's EnterNotify event would appear in the "stream" of
- : widget 1's MotionNotify events, e.g.
-
- : Dragging [w1]...
- : Dragging [w1]...
- : EnterNotify [w2]...
- : Dragging [w1]...
-
- : We do *not* see this behavior. The problem is that widget 2 never gets
- : the EnterNotify event until *after* the button is released, which is
- : too late:
-
- A button press event sets up a passive grab.
-
- Chris Atkins
- chris@ods.com
-