Re: My cut at fixing the GnomeCanvas focus and grab issues
- From: Havoc Pennington <hp redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: <gnome-libs-devel gnome org>
- Subject: Re: My cut at fixing the GnomeCanvas focus and grab issues
- Date: 06 Dec 2001 20:33:29 -0500
Darin Adler <darin bentspoon com> writes:
> By the way, it's confusing that left_grabbed_item has nothing to do with
> grabbed_item. It's a totally separate concept of grabbed that means "item
> you moused down on" that works even if you don't call gnome_canvas_item_grab
> at all.
Agree it's confusing - I didn't figure out what it did. ;-)
IIRC the canvas copies a feature from X, which is that when you press
down a button, the pointer is automatically grabbed. In X, a grab
obtained this way ends up being identical to one obtained via
gdk_pointer_grab().
When writing the original gnome-iconedit, I had the problem that there
was no way to _avoid_ this behavior (as there is in X). In X, you can
call ungrab() after getting the button press to release the
auto-grab. So it may make sense to allow that. (You can also just turn
off the autograbbing, but this is so rarely useful that GTK won't even
let you do it without dropping to Xlib.)
Could perhaps clean up the code by simply calling
gnome_canvas_item_grab() in order to do the autograb. A grab could
then result in a repick, which would pick the newly-grabbed item and
do the focus in/out and enter/leave triggered by the grab. (As in X a
grab should probably cause an enter notify on the grab item, etc.) I
dunno.
We should probably make sure Federico is paying attention, I remember
him having strong opinions on all this.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]