Re: pointer grabs and drawing areas
- From: Owen Taylor <otaylor redhat com>
- To: Paul Davis <pbd op net>
- Cc: gtk-list gnome org
- Subject: Re: pointer grabs and drawing areas
- Date: Wed, 22 May 2002 22:17:09 -0400 (EDT)
Paul Davis <pbd op net> writes:
> i have a drawing area set up to receive both button press+release
> events. my understanding is that X/GDK automatically does a pointer
> grab when a GdkWindow has these events set for itself. i also receive
> motion events, via motion hints.
>
> if i press and then move the pointer outside the drawing area, i
> continue to get motion events. however, this is only true if i don't
> move the pointer into the canvas that is packed above the drawing area
> in a table.
>
> how could this be? can the canvas grab the pointer away somehow?
Sounds like this is with GTK+-1.2.
Read the description of owner_events in the XGrabPointer() man page;
GTK+-1.2 always put OwnerGrabButtonMask in the event mask so the
automatic grab was like a grab with owner_events = TRUE. GTK+-2.0
doesn't add OwnerGrabButtonMask.
For GTK+-1.2, the way that people got around this problem was
by doing a gtk_grab_add() on button press, and a gtk_grab_remove
on button release.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]