Re: X11 timestamp problems? (Re: Minutes of the GNOME Board meeting 19 March 2001)



Tim Janik <timj gtk org> writes:

> On Thu, 22 Mar 2001, Daniel Veillard wrote:
> 
> > 	  Minutes of the GNOME Board meeting 19 March 2001
> > 	  ================================================
> 
> [...]
> 
> >    Jim raised the fact that there was X11 timestamps problems in GTK
> >    (possibly in dialog box, passive grabs ...).
> 
> jim, can we hear more about this? i'm not yet
> aware of such problems.

What Jim has traditionally harassed me about in this area is the handling
of popup menus in GTK+, where we grab the mouse only after we receive
the mouse button press.

This means that the users mouse actions between the time he presses
the button to pop up the menu and the time we pop up the menu are
lost, so you can't mouse ahead in the menu.

The _really_ correct way to handle this is to establish a passive grab
on the the parent widget in advance with XGrabButton, passing
GrabModeSync for the pointer_mode, and then when the menu pops
up, call XAllowEvents to replay the events after the button
press to pop up the menu.

However, this fits really badly into the GTK+ model of event handling,
with application callbacks in response to events. So, I've never
really been able to convince myself that adding the sort of extra
complications that would be needed to try and do things this
way would be worth the benefit to users.

(It really only affects the remote case, and then only advanced users
who know their menus really well.)

Also, note that using XGrabButton doesn't help you if you want to pop
up a submenu in response to an enter notify, or in response to 
a button release, as Nautilus does (shudder).

Regards,
                                        Owen




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