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: Keith David Bershatsky
Subject: bug#23074: 25.1.50; X11: `use-fancy-splash-screens-p` erroneously returns nil.
Date: Sun, 20 Mar 2016 22:08:43 -0700

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

Thanks,

Keith





reply via email to

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