From: storm@cua.dk (Kim F. Storm)
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [simon.marshall@misys.com: Lingering input pending with motif menu bar]
Date: Tue, 04 Jul 2006 11:08:12 +0200 [thread overview]
Message-ID: <m38xn9wxdv.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <87d5cmnpe7.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 03 Jul 2006 21:13:20 -0400")
Chong Yidong <cyd@stupidchicken.com> writes:
> As the Hanoi program runs, it checks (input-pending-p), and quits if
> input is detected. The trouble is that when you invoke hanoi with the
> menubar, on some toolkits, (input-pending-p) gets triggered even when
> there is no input arriving.
>
> The Elisp manual entry for input-pending-p says
>
> On rare occasions it may return `t' when no input is available.
This is inaccurate! It happens all the time.
For example, try this:
GNU Emacs 22.0.50.67 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
emacs -Q
M-x hanoi
Move the mouse to a tool-bar button or outside the emacs frame.
Hanoi quits.
Problem is that input-pending-p simply indicates that there is
some unprocessed event in the queue -- not necessarily something
the user entered by pressing a key or clicking a mouse button.
I haven't looked to see what specific events are in the queue
in the above cases, but maybe it is a help-echo and "leave" event.
> Maybe someone who's worked on sit-for and/or the no-toolkit menu code
> can enlighten us. Why does the input-pending-p get triggered, and is
> there any way to distinguish between a real input event and a fake
> one? (Checking unread-command-chars or last-input-event doesn't
> work).
There is code to ignore FOCUS_IN events in readable_events.
Maybe we can extend the list to include more events.
But we may want to actually process some of those events.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2006-07-04 9:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-01 23:55 [simon.marshall@misys.com: Lingering input pending with motif menu bar] Richard Stallman
2006-07-04 1:13 ` Chong Yidong
2006-07-04 9:08 ` Kim F. Storm [this message]
2006-07-04 13:45 ` Chong Yidong
2006-07-04 20:53 ` Richard Stallman
2006-07-04 21:21 ` [simon.marshall@misys.com: Lingering input pending with motifmenu bar] Drew Adams
2006-07-05 17:01 ` Richard Stallman
2006-07-05 20:48 ` [simon.marshall@misys.com: Lingering input pending withmotifmenu bar] Drew Adams
2006-07-07 4:14 ` Richard Stallman
2006-07-05 17:01 ` [simon.marshall@misys.com: Lingering input pending with motifmenu bar] Richard Stallman
2006-07-05 0:06 ` [simon.marshall@misys.com: Lingering input pending with motif menu bar] Chong Yidong
2006-07-05 9:04 ` Kim F. Storm
2006-07-04 17:03 ` [simon.marshall@misys.com: Lingering input pending with motifmenu bar] Drew Adams
2006-07-07 21:55 ` Revamping sit-for [Was: Lingering input pending with motif menu bar] Chong Yidong
2006-07-07 22:02 ` Revamping sit-for David Kastrup
2006-07-07 22:58 ` Revamping sit-for [Was: Lingering input pending with motif menu bar] Drew Adams
2006-07-08 1:39 ` Revamping sit-for Chong Yidong
2006-07-08 3:53 ` Drew Adams
2006-07-08 12:00 ` Chong Yidong
2006-07-08 12:36 ` David Kastrup
2006-07-08 12:56 ` Romain Francoise
2006-07-08 12:40 ` Stefan Monnier
2006-07-08 15:41 ` Drew Adams
2006-07-08 20:57 ` Richard Stallman
2006-07-08 15:31 ` Revamping sit-for [Was: Lingering input pending with motif menu bar] Richard Stallman
2006-07-08 22:49 ` Kim F. Storm
2006-07-09 19:03 ` Richard Stallman
2006-07-10 12:10 ` Kim F. Storm
2006-07-11 5:50 ` Richard Stallman
2006-07-08 23:02 ` Kim F. Storm
2006-07-10 19:47 ` Revamping sit-for Chong Yidong
2006-07-11 0:24 ` Chong Yidong
2006-07-11 18:16 ` Richard Stallman
2006-07-11 18:39 ` Kim F. Storm
2006-07-12 19:22 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m38xn9wxdv.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
--cc=rms@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 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.