T.R | Title | User | Personal Name | Date | Lines |
---|
1220.1 | | AITG::DERAMO | Daniel V. {AITG,ZFC}:: D'Eramo | Wed Aug 02 1989 14:53 | 15 |
| If the mouse button is grabbed, and you press it, then you should
see a leave event and an enter event before the button-press event.
With our window manager, if you press MB1 on the window, you should
see those events. I believe it is the proper server behavior. There
is a field in the leave and enter event that enables one to
distinguish between "grab" leave and enter events and "real" ones.
The "mode" is either NotifyNormal or NotifyGrab. I have Dave
Burleigh's demo that will show this, just copy EVENTS.* from
ZFC::ZFC$DISK1:[PUBLIC.TBD1].
Maybe the idea was that the grabbed pointer "left" the window to
click on a window manager window [??] and then "came back."
Dan
|
1220.2 | other question ! | ANNECY::SIRON | | Wed Sep 13 1989 06:58 | 17 |
|
I've got an other problem !
I :
- create a window widget in a UIL module.
- specify the ButtonPressMask | MotionNotifyMask in the
XtAddEventHandler routine.
Then, if i move out of the window while MB1 is pressed, the
callback procedure is called with the MotionNotify event's
type, despite of the fact that :
- i'm out of the window.
- i didn't specifie the ButtonMotionMask.
Any help welcome. Thanks.
|
1220.3 | Implicit "Grab" | LEOVAX::TREGGIARI | | Wed Sep 13 1989 08:51 | 9 |
| The reason this happens is because the server does an implicit
grab when the button is pressed. You can read about this in an
Xlib or X Protocol manual under button events. If you don't
want this to happen, then you can call XUngrabxxxxx (where I
*think* "xxxxx" is "Pointer") in your event handler when you
get the button press event.
Leo
|
1220.4 | More on unsolicited events | DECWIN::KLEIN | | Wed Sep 13 1989 12:09 | 17 |
| I agree with Leo's diagnosis (the implicit grab), but calling XUngrab*
is not a complete solution. Because the client to server communication
is asynchronous, it is possible (even likely) that the server will have
sent some motion events to the client before receiving the XUngrab
request.
What this means is that the client (your application) must be prepared
to receive (and ignore) extraneous motion events, even if you issue
the XUngrab request immediately upon receipt of the ButtonPress event.
In general, applications must be prepared to receive (and ignore)
unsolicited events. This is especially true within widgets that
might have their event mask changed by the application through
the use of XtAugmentTranslations and its friends.
-steve-
|