unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Engster <deng@randomsample.de>
To: emacs-devel@gnu.org
Subject: Emacs fullscreen and sizes in frame parameters
Date: Sun, 09 Jun 2013 00:04:57 +0200	[thread overview]
Message-ID: <87txl8dzsm.fsf@engster.org> (raw)

I'd like Emacs to display an image so that it spans the *entire* screen
from top to bottom. That means: just the image, no window decorations or
anything else.

I know that Emacs frames can only have pixel-sizes which are multiples
of the character width and height. Still, I was hoping that I could
achieve that by simply making the frame a bit larger. However, it seems
I cannot resize the frame when the 'fullscreen' parameter is set to
'fullboth', which (I think) is the only way to get rid of the window
decorations. Is this really the case or am I missing something?

Here's what I've tried (you need an Imagemagick-enabled Emacs for this,
and I guess the x-display-* thingies only work under X11):

(let* ((cols (/ (x-display-pixel-width)
		(frame-char-width)))
       (lines (/ (x-display-pixel-height)
		 (frame-char-height))))
  (with-selected-frame
      (make-frame
       '((minibuffer . nil)
	 (left-fringe . 0)
	 (right-fringe . 0)
	 (menu-bar-lines . 0)
	 (vertical-scroll-bars . nil)
	 (tool-bar-lines . 0)
	 (fullscreen . fullboth)))
    (modify-frame-parameters
     nil
     `((width . ,(1+ cols))
       (height . ,(1+ lines))))
    (switch-to-buffer (get-buffer-create "test"))
    (setq mode-line-format nil)
    (insert-image
     (create-image "someimagefile" 'imagemagick nil
		   :height (x-display-pixel-height)))))


If you evaluate this, you'll get an empty buffer in a fullscreen Emacs
frame, and as you can see I set 'width' and 'height' slightly bigger
than the actual viewport, but it seems this doesn't have any effect
since the image is still truncated at the bottom, at least if

(mod (x-display-pixel-height) (frame-char-height))

is not zero, which is mostly the case.

So, is there any possibility to reliably display an image with ':height
(x-display-pixel-height)', so that it is not truncated?

-David



             reply	other threads:[~2013-06-08 22:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-08 22:04 David Engster [this message]
2013-06-09  2:43 ` Emacs fullscreen and sizes in frame parameters Eli Zaretskii
2013-06-09  6:47   ` David Engster
2013-06-09  7:24     ` David Engster
2013-06-09  9:12       ` David Engster
2013-06-09  9:14       ` Jan Djärv
2013-06-09  9:40         ` David Engster
2013-06-09 12:47           ` chad
2013-06-09 15:52             ` Thien-Thi Nguyen
2013-06-09 18:42             ` David Engster
2013-06-10 16:10               ` David Engster
2013-06-09  6:55 ` Jan Djärv
2013-06-09 15:54   ` Eli Zaretskii

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=87txl8dzsm.fsf@engster.org \
    --to=deng@randomsample.de \
    --cc=emacs-devel@gnu.org \
    /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).