unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
Subject: Motif menu popups not working in CVS
Date: Sat, 4 Jan 2003 16:53:08 +0100 (CET)	[thread overview]
Message-ID: <200301041726.h04HQhdw001850@stubby.bodenonline.com> (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.

             reply	other threads:[~2003-01-04 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-04 15:53 Jan D. [this message]
2003-01-05 18:33 ` Motif menu popups not working in CVS Richard Stallman
2003-01-06  0:08   ` Jan D.
2003-01-06 13:28     ` Jan D.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301041726.h04HQhdw001850@stubby.bodenonline.com \
    --to=jan.h.d@swipnet.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).