[Top][All Lists]

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

Re: Motif menu popups not working in CVS

From: Jan D.
Subject: Re: Motif menu popups not working in CVS
Date: Mon, 6 Jan 2003 14:28:47 +0100 (CET)

> >     The only events that do get saved are EnterNotify, LeaveNotify,
> >     FocusOut, FocusIn and MotionNotify.  Losing these is no big deal, since
> >     the menu has the pointer and keyboard grabbed anyway.
> >
> > Could you explain that reasoning?  I don't see how the conclusion
> > follows.  I'm sure the code was added to solve a problem.
> I'm sure it was, but I am not sure the problem remains.  Since the
> popup/dialog has a grab, a FocusOut and Leave is generated when the
> popup/dialog is posted.  A new FocusIn and Enter notify will be
> generated when the popup/dialog is removed (if Emacs gets the focus),
> so keeping track of what happend in between is not useful, it is just
> the final state that is interesting.  In fact, a common optimization is
> to compress Enter-Leave sequences that occur quickly after each other
> (GTK does this).
> The MotionNotify events will have the popup/dialog window in the event,
> since a grab has been done, so there will be no action for these events
> anyway when they are replayed.

We can do this even better.  The GTK port splits XTread_socket in to
two functions, one that loops and one that handles one event.

We can make a new function, x_dispatch_event, that calls the function that
handles one event, and use x_dispatch_event instead of XtDispatchEvent.

Then we definitly can remove the saving and reinsertions of event.
process_expose_from_menu function can be removed also.  If we use this 
for the Motif file selection dialog, we get the added bonus that
expose of the frame under the dialog is handeled much better.
Now, it relies on a signal getting trough in a short space of time,
and if that time frame is missed, a redraw does not get done.

        Jan D.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]