bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23074: 25.1.50; X11: `use-fancy-splash-screens-p` erroneously return


From: Eli Zaretskii
Subject: bug#23074: 25.1.50; X11: `use-fancy-splash-screens-p` erroneously returns nil.
Date: Mon, 21 Mar 2016 18:03:24 +0200

> Date: Sun, 20 Mar 2016 22:08:43 -0700
> From: Keith David Bershatsky <esq@lawlist.com>
> 
> Emacs master branch built `--with-x --with-ns=no` with full image support on 
> an OSX machine (10.6.8) does not display the Emacs logo on the Welcome screen 
> because the final test of `use-fancy-splash-screen-p` returns nil.  If we use 
> 17 instead of 19, the test returns `t` and the Emacs logo is displayed.
> 
> I would suggest using a better test like `one-window-p`, because 19 is too 
> big.
> 
>     (defun use-fancy-splash-screens-p ()
>       "Return t if fancy splash screens should be used."
>       (when (and (display-graphic-p)
>                  (or (and (display-color-p)
>               (image-type-available-p 'xpm))
>                      (image-type-available-p 'pbm)))
>         (let ((frame (fancy-splash-frame)))
>           (when frame
>       (let* ((img (create-image (fancy-splash-image-file)))
>              (image-height (and img (cdr (image-size img nil frame))))
>              ;; We test frame-height so that, if the frame is split
>              ;; by displaying a warning, that doesn't cause the normal
>              ;; splash screen to be used.
>              (frame-height (1- (frame-height frame))))
>        ;; The original value added to the `image-height' for the test was 19; 
> however,
>        ;; that causes the test to fail on X11 by about 1.5 -- so use 17 
> instead.
>         (> frame-height (+ image-height 17)))))))

I would like to understand the situation before discussing the
solution.  Please tell what these two evaluations yield in "emacs -q":

  M-: (frame-height) RET
  M-: (image-size (create-image (fancy-splash-image-file))) RET

On my system, the first one produces 35, the second (41.625 . 14.5625).

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]