From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Question about sit-for. Date: Sun, 30 Jan 2005 17:37:29 +0100 Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1107103667 22511 80.91.229.6 (30 Jan 2005 16:47:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2005 16:47:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 30 17:47:39 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CvIEc-0004q7-00 for ; Sun, 30 Jan 2005 17:47:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvIRJ-00032j-N9 for ged-emacs-devel@m.gmane.org; Sun, 30 Jan 2005 12:00:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvIPz-0002st-Nk for emacs-devel@gnu.org; Sun, 30 Jan 2005 11:59:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvIPp-0002mu-Ae for emacs-devel@gnu.org; Sun, 30 Jan 2005 11:59:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvIPo-0002lc-C2 for emacs-devel@gnu.org; Sun, 30 Jan 2005 11:59:12 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CvI5X-00027v-02 for emacs-devel@gnu.org; Sun, 30 Jan 2005 11:38:15 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050130163813.QDBL12890.mxfep02.bredband.com@coolsville.localdomain> for ; Sun, 30 Jan 2005 17:38:13 +0100 Original-To: Emacs-Devel Devel X-Mailer: Apple Mail (2.619.2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32644 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32644 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.