all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Motif menu popups not working in CVS
@ 2003-01-04 15:53 Jan D.
  2003-01-05 18:33 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Jan D. @ 2003-01-04 15:53 UTC (permalink / raw)


Hello.

I just noticed that the Motif popup menus aren't working.  That is,
they pop up and down OK, but invoking a menu item has no effect.
The introduction of popup_get_selection_unwind seems to be the cause:

2002-12-21  Richard M. Stallman  <rms@gnu.org>

        * xmenu.c (popup_get_selection): Now static.  New arg DO_TIMERS.
        If it is non-nil, run timers.  Use an unwind-protect to requeue
        the events that were read ahead.
        (popup_get_selection_unwind): New subroutine.
        (popup_get_selection_queue): File-scope variable now holds that queue.
        (xmenu_show): Pass 0 for DO_TIMERS to popup_get_selection.
        (xdialog_show): Pass 1 for DO_TIMERS to popup_get_selection.
        Use an unwind-protect to pop down the dialog box.
        (xdialog_show_unwind): New subroutine implements that.


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.

I have a patch for this, but I have a question.  In popup_get_selection
events that are not acted upon immediately are saved in a queue.  Later
when the menu pops down, these events are reinserted into the X event
queue to be re-read by Emacs "normal" event handling.

I don't think this is needed.  Removing this and running shows no
ill effects, in fact, no difference between saving and not saving
can be seen for dialogs or popup menus.

The only events that do get saved are EnterNotify, LeaveNotify,
FocusOut, FocusIn and MotionNotify.  Loosing these is no big deal, since
the menu has the pointer and keyboard grabbed anyway.  What kind of
problem is saving these events supposed to solve?  If we can remove
the saving of events, the popup_get_selection_unwind can be removed also.

Thanks,
	Jan D.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-06 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-04 15:53 Motif menu popups not working in CVS Jan D.
2003-01-05 18:33 ` Richard Stallman
2003-01-06  0:08   ` Jan D.
2003-01-06 13:28     ` Jan D.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.