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 14:28:47 +0100 (CET)	[thread overview]
Message-ID: <200301061424.h06EObdw004015@stubby.bodenonline.com> (raw)
In-Reply-To: <F5BB1E7A-210A-11D7-959F-00039363E640@swipnet.se> "from Jan D. at Jan 6, 2003 01:08:18 am"

> 
> >     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	other threads:[~2003-01-06 13:28 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.
2003-01-06 13:28     ` Jan D. [this message]

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=200301061424.h06EObdw004015@stubby.bodenonline.com \
    --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).