unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Question about sit-for.
@ 2005-01-30 16:37 Jan D.
  2005-01-31 12:01 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Jan D. @ 2005-01-30 16:37 UTC (permalink / raw)


Hello.

I'm looking in to a bug report that the non-fancy splash screen does 
not appear when "About Emacs" is invoked from the menu (GTK version).

The problem turns out to be sit-for.  The normal splash screen 
(normal-splash-screen) uses (sit-for 120) to wait for input, and then 
remove the splash screen.  The problem with this approach is that the 
GTK menu bar takes focus and so when the menu bar action is invoked, a 
FOCUS_IN event to the frame is generated.  This event makes the sit-for 
return at once so the splash screen is never seen.

A solution is to modify sit-for so that it ignores FOCUS events.  But 
since that may affect other things it is a bit of a risky change.  The 
documentation for sit-for says:
"...wait for seconds seconds or until input is available."

Is FOCUS_IN considered input?  Or do we need another sit-for that waits 
until "real input" (mouse click or key invoked) is available?

I can not get rid of the FOCUS_IN in this special case, it is needed 
for Emacs to detect focus correctly.  The reason GTK differs from other 
toolkits is because GTK also has a buffering of events (in addition to 
X) so the timing is different.

An alternative approach is to use the same mechanism as the 
fancy-splash-screens, i.e. a timer instead of sit-for.

	Jan D.

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

* Re: Question about sit-for.
  2005-01-30 16:37 Question about sit-for Jan D.
@ 2005-01-31 12:01 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2005-01-31 12:01 UTC (permalink / raw)
  Cc: emacs-devel

    Is FOCUS_IN considered input?

It should never be considered input in a user-visible way.

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

end of thread, other threads:[~2005-01-31 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-30 16:37 Question about sit-for Jan D.
2005-01-31 12:01 ` Richard Stallman

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).