Re: motion notify question



Hmm, I just noticed that GTK 1.2 specifies OwnerGrabButtonMask in the
event mask for the X window, and GTK 1.3.x does not.

Fri Feb 18 14:37:29 2000  Owen Taylor  <otaylor redhat com>

        * gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
        OwnerGrabButtonMask from button entries for
        GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.

Owen didn't explain the issues there, he can probably do so better
than I can.

pavel klebanov ne mediaone net writes:
You make a good point, but my experiments show that if you were to release
in another window which captures releases then the release won't register
in the original widget. Is this your experience, too?

So if you are programming something like a lever, the following
unfortunate combination might happen. Suppose you
1. Press the mouse within the lever.
2. Move it outside the bounds.
3. Release it over another lever.
4. Then press it down elsewhere
5. Move it with in the bounds of the original lever.

As far as the original lever is concerned then is that it's been pressed
down and now the mouse is moving over it with the button pressed. So it
must react which is incorrect. The problem is that it has no way to find
out that it's been released and that another one has been pressed - if
there's no communication between the objects.

The way I solve the problem is by enabling focus and then capturing the
loss of focus, but you would agree that's not very clean...


I think it may change depending on GTK version, then.

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]