unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs fullscreen and sizes in frame parameters
@ 2013-06-08 22:04 David Engster
  2013-06-09  2:43 ` Eli Zaretskii
  2013-06-09  6:55 ` Jan Djärv
  0 siblings, 2 replies; 13+ messages in thread
From: David Engster @ 2013-06-08 22:04 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-06-10 16:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08 22:04 Emacs fullscreen and sizes in frame parameters David Engster
2013-06-09  2:43 ` 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

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