all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18347: 24.3.93; Incomplete splash screen display on Cygwin-w32 build
@ 2014-08-28 21:51 Ken Brown
  2014-08-29  6:25 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2014-08-28 21:51 UTC (permalink / raw
  To: 18347

When I start up the Cygwin-w32 build of emacs, the image at the top of 
the splash screen often fails to display.  The following patch fixes it:

=== modified file 'lisp/startup.el'
--- lisp/startup.el     2014-07-08 09:17:09 +0000
+++ lisp/startup.el     2014-08-28 20:07:20 +0000
@@ -1812,7 +1812,7 @@
    (let (chosen-frame)
      ;; MS-Windows needs this to have a chance to make the initial
      ;; frame visible.
-    (if (eq system-type 'windows-nt)
+    (if (eq window-system 'w32)
         (sit-for 0 t))
      (dolist (frame (append (frame-list) (list (selected-frame))))
        (if (and (frame-visible-p frame)

Is this still OK for the native Windows build?  If so, is it OK to 
install it in the release branch?


In GNU Emacs 24.3.93.2 (x86_64-unknown-cygwin)
  of 2014-08-28 on moufang
Repository revision: 117464 rgm@gnu.org-20140828191824-o5hn2x503w527yhn
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
  `configure --with-w32 --enable-checking=yes,glyphs 'CFLAGS=-g3 -O0''





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

* bug#18347: 24.3.93; Incomplete splash screen display on Cygwin-w32 build
  2014-08-28 21:51 bug#18347: 24.3.93; Incomplete splash screen display on Cygwin-w32 build Ken Brown
@ 2014-08-29  6:25 ` Eli Zaretskii
  2014-08-29 15:08   ` Ken Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2014-08-29  6:25 UTC (permalink / raw
  To: Ken Brown; +Cc: 18347

> Date: Thu, 28 Aug 2014 17:51:06 -0400
> From: Ken Brown <kbrown@cornell.edu>
> 
> --- lisp/startup.el     2014-07-08 09:17:09 +0000
> +++ lisp/startup.el     2014-08-28 20:07:20 +0000
> @@ -1812,7 +1812,7 @@
>     (let (chosen-frame)
>       ;; MS-Windows needs this to have a chance to make the initial
>       ;; frame visible.
> -    (if (eq system-type 'windows-nt)
> +    (if (eq window-system 'w32)
>          (sit-for 0 t))
>       (dolist (frame (append (frame-list) (list (selected-frame))))
>         (if (and (frame-visible-p frame)

It is fundamentally wrong to use window-system the variable in such
circumstances (or almost any other).  Please use the function instead.

> Is this still OK for the native Windows build?  If so, is it OK to 
> install it in the release branch?

Yes and yes.  Although I'd urge you to try to figure out why this is
needed in the cygwin-w32 build (the native-build problem which led to
this code manifested itself in a rather different way, see bug#16014).





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

* bug#18347: 24.3.93; Incomplete splash screen display on Cygwin-w32 build
  2014-08-29  6:25 ` Eli Zaretskii
@ 2014-08-29 15:08   ` Ken Brown
  2014-08-29 19:41     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2014-08-29 15:08 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 18347

On 8/29/2014 2:25 AM, Eli Zaretskii wrote:
>> Date: Thu, 28 Aug 2014 17:51:06 -0400
>> From: Ken Brown <kbrown@cornell.edu>
>>
>> --- lisp/startup.el     2014-07-08 09:17:09 +0000
>> +++ lisp/startup.el     2014-08-28 20:07:20 +0000
>> @@ -1812,7 +1812,7 @@
>>      (let (chosen-frame)
>>        ;; MS-Windows needs this to have a chance to make the initial
>>        ;; frame visible.
>> -    (if (eq system-type 'windows-nt)
>> +    (if (eq window-system 'w32)
>>           (sit-for 0 t))
>>        (dolist (frame (append (frame-list) (list (selected-frame))))
>>          (if (and (frame-visible-p frame)
>
> It is fundamentally wrong to use window-system the variable in such
> circumstances (or almost any other).  Please use the function instead.

OK.  But could you explain why?  TIA.

>> Is this still OK for the native Windows build?  If so, is it OK to
>> install it in the release branch?
>
> Yes and yes.  Although I'd urge you to try to figure out why this is
> needed in the cygwin-w32 build (the native-build problem which led to
> this code manifested itself in a rather different way, see bug#16014).

Actually, the visual symptom I'm describing (failure of the logo to 
appear) is identical to what Juanma reported in that bug.  Your message 
in that bug discussion says, "It's again that timing thing with making 
the initial frame visible."  The "again" suggests that there is an 
earlier bug report or discussion about that.  Can you give me a 
reference or just explain what you meant by that?

Ken






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

* bug#18347: 24.3.93; Incomplete splash screen display on Cygwin-w32 build
  2014-08-29 15:08   ` Ken Brown
@ 2014-08-29 19:41     ` Eli Zaretskii
  2014-08-29 22:17       ` Ken Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2014-08-29 19:41 UTC (permalink / raw
  To: Ken Brown; +Cc: 18347

> Date: Fri, 29 Aug 2014 11:08:21 -0400
> From: Ken Brown <kbrown@cornell.edu>
> CC: 18347@debbugs.gnu.org
> 
> On 8/29/2014 2:25 AM, Eli Zaretskii wrote:
> >> Date: Thu, 28 Aug 2014 17:51:06 -0400
> >> From: Ken Brown <kbrown@cornell.edu>
> >>
> >> --- lisp/startup.el     2014-07-08 09:17:09 +0000
> >> +++ lisp/startup.el     2014-08-28 20:07:20 +0000
> >> @@ -1812,7 +1812,7 @@
> >>      (let (chosen-frame)
> >>        ;; MS-Windows needs this to have a chance to make the initial
> >>        ;; frame visible.
> >> -    (if (eq system-type 'windows-nt)
> >> +    (if (eq window-system 'w32)
> >>           (sit-for 0 t))
> >>        (dolist (frame (append (frame-list) (list (selected-frame))))
> >>          (if (and (frame-visible-p frame)
> >
> > It is fundamentally wrong to use window-system the variable in such
> > circumstances (or almost any other).  Please use the function instead.
> 
> OK.  But could you explain why?  TIA.

Because we don't want to risk assigning it a value.  Also, the
function can accept a frame argument, thus giving you a chance to
inquire about a specific frame (different frames can have different
window-system values).

And if you use window-system as a predicate (not in this case,
obviously), you should use the various display-*-p predicates instead.

> >> Is this still OK for the native Windows build?  If so, is it OK to
> >> install it in the release branch?
> >
> > Yes and yes.  Although I'd urge you to try to figure out why this is
> > needed in the cygwin-w32 build (the native-build problem which led to
> > this code manifested itself in a rather different way, see bug#16014).
> 
> Actually, the visual symptom I'm describing (failure of the logo to 
> appear) is identical to what Juanma reported in that bug.

OK, but that's not what your original description said.

> Your message in that bug discussion says, "It's again that timing
> thing with making the initial frame visible."  The "again" suggests
> that there is an earlier bug report or discussion about that.  Can
> you give me a reference or just explain what you meant by that?

Bug#14841, I think.

Basically, since creating a frame on w32 takes some time until the OS
sets up the message pump for the new frame, Lisp code that creates a
frame and immediately proceeds with manipulating the new frame might
sometimes need sit-for to let the dust settle.





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

* bug#18347: 24.3.93; Incomplete splash screen display on Cygwin-w32 build
  2014-08-29 19:41     ` Eli Zaretskii
@ 2014-08-29 22:17       ` Ken Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Ken Brown @ 2014-08-29 22:17 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 18347-done

Version: 24.3.94

> Basically, since creating a frame on w32 takes some time until the OS
> sets up the message pump for the new frame, Lisp code that creates a
> frame and immediately proceeds with manipulating the new frame might
> sometimes need sit-for to let the dust settle.

So it seems that the current bug probably has the same cause as 
bug#16014.  I've installed the fix (but using the window-system 
function) in the release branch as bzr revision 117465.

Ken





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

end of thread, other threads:[~2014-08-29 22:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 21:51 bug#18347: 24.3.93; Incomplete splash screen display on Cygwin-w32 build Ken Brown
2014-08-29  6:25 ` Eli Zaretskii
2014-08-29 15:08   ` Ken Brown
2014-08-29 19:41     ` Eli Zaretskii
2014-08-29 22:17       ` Ken Brown

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.