emacs-devel
[Top][All Lists]
Advanced

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

Emacs fullscreen and sizes in frame parameters


From: David Engster
Subject: Emacs fullscreen and sizes in frame parameters
Date: Sun, 09 Jun 2013 00:04:57 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

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 via email to

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