unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 23074@debbugs.gnu.org
Subject: bug#23074: 25.1.50; X11: `use-fancy-splash-screens-p` erroneously returns nil.
Date: Mon, 21 Mar 2016 18:03:24 +0200	[thread overview]
Message-ID: <831t737r8z.fsf@gnu.org> (raw)
In-Reply-To: <m237rkquxw.wl%esq@lawlist.com> (message from Keith David Bershatsky on Sun, 20 Mar 2016 22:08:43 -0700)

> 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	other threads:[~2016-03-21 16:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21  5:08 bug#23074: 25.1.50; X11: `use-fancy-splash-screens-p` erroneously returns nil Keith David Bershatsky
2016-03-21 16:03 ` Eli Zaretskii [this message]
2016-03-22  1:03 ` Keith David Bershatsky
2016-03-22 16:07   ` Eli Zaretskii
2016-03-23  2:04 ` Keith David Bershatsky
2016-03-25  7:49   ` Eli Zaretskii
2016-03-27  4:04 ` Keith David Bershatsky
2016-03-27 14:57   ` Eli Zaretskii
2016-04-08  8:30   ` Eli Zaretskii
2016-04-08 16:26     ` Keith David Bershatsky
2016-04-09  6:48 ` Keith David Bershatsky
2016-04-09  7:53   ` Eli Zaretskii
2016-04-16 11:59     ` Eli Zaretskii
2020-08-15  4:22       ` Stefan Kangas
2021-04-10 15:33         ` John Hawkinson
2021-04-10 17:35           ` Eli Zaretskii
2021-04-10 17:49             ` John Hawkinson
2021-12-30 22:49             ` John Hawkinson
2021-12-31 13:27               ` Eli Zaretskii
2016-04-09 19:05 ` Keith David Bershatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831t737r8z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23074@debbugs.gnu.org \
    --cc=esq@lawlist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).