[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 01:08:18 +0100

söndagen den 5 januari 2003 kl 19.33 skrev Richard Stallman:

    It is some sort of race condition here, it seems that
    popup_get_selection exits and removes the popup before Motif has
    had a chance to invoke its callback for the menu item.  Lucid
    menus work OK.

That is strange.  Where is popup_activated_flag getting cleared
in the case that fails?

In the if-branch for ButtonRelease.  It may be that Motif does not
calls the activate callback directly on the ButtonRelease event.

    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.

        Jan D.

reply via email to

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