unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: Motif menu popups not working in CVS
Date: Mon, 6 Jan 2003 01:08:18 +0100	[thread overview]
Message-ID: <F5BB1E7A-210A-11D7-959F-00039363E640@swipnet.se> (raw)
In-Reply-To: <E18VFaY-0008P2-00@fencepost.gnu.org>


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	other threads:[~2003-01-06  0:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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. [this message]
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=F5BB1E7A-210A-11D7-959F-00039363E640@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    /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).