* 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
* Re: Emacs fullscreen and sizes in frame parameters
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 6:55 ` Jan Djärv
1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2013-06-09 2:43 UTC (permalink / raw)
To: David Engster; +Cc: emacs-devel
> From: David Engster <deng@randomsample.de>
> Date: Sun, 09 Jun 2013 00:04:57 +0200
>
> 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?
Yes, this is by design.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
2013-06-09 2:43 ` Eli Zaretskii
@ 2013-06-09 6:47 ` David Engster
2013-06-09 7:24 ` David Engster
0 siblings, 1 reply; 13+ messages in thread
From: David Engster @ 2013-06-09 6:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii writes:
>> From: David Engster <deng@randomsample.de>
>> Date: Sun, 09 Jun 2013 00:04:57 +0200
>>
>> 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?
>
> Yes, this is by design.
So the only way to have Emacs cover the entire screen without window
decorations is to use a font which fits?
If so, is there some way to override the character width/height? Since
I'm only displaying images, I wouldn't care about garbled text.
-David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
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
0 siblings, 2 replies; 13+ messages in thread
From: David Engster @ 2013-06-09 7:24 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
David Engster writes:
> Eli Zaretskii writes:
>>> From: David Engster <deng@randomsample.de>
>>> Date: Sun, 09 Jun 2013 00:04:57 +0200
>>>
>>> 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?
>>
>> Yes, this is by design.
>
> So the only way to have Emacs cover the entire screen without window
> decorations is to use a font which fits?
Actually, even that does not seem to work. If I set the '8x16' font in
the new frame and then switch to fullscreen, it can show only 47 lines
instead of 48 on a 1366x768 display. What is taking up the space down
there?
-David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
2013-06-09 7:24 ` David Engster
@ 2013-06-09 9:12 ` David Engster
2013-06-09 9:14 ` Jan Djärv
1 sibling, 0 replies; 13+ messages in thread
From: David Engster @ 2013-06-09 9:12 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
David Engster writes:
> David Engster writes:
>> Eli Zaretskii writes:
>>>> From: David Engster <deng@randomsample.de>
>>>> Date: Sun, 09 Jun 2013 00:04:57 +0200
>
>>>>
>>>> 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?
>>>
>>> Yes, this is by design.
>>
>> So the only way to have Emacs cover the entire screen without window
>> decorations is to use a font which fits?
>
> Actually, even that does not seem to work. If I set the '8x16' font in
> the new frame and then switch to fullscreen, it can show only 47 lines
> instead of 48 on a 1366x768 display. What is taking up the space down
> there?
Aaah, it's the internal border. Setting
(internal-border-width . 0)
in the frame parameters will do the trick.
-David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
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
1 sibling, 1 reply; 13+ messages in thread
From: Jan Djärv @ 2013-06-09 9:14 UTC (permalink / raw)
To: David Engster; +Cc: Eli Zaretskii, emacs-devel
Hello.
Internal or external border width probably.
Jan D.
9 jun 2013 kl. 09:24 skrev David Engster <deng@randomsample.de>:
> David Engster writes:
>> Eli Zaretskii writes:
>>>> From: David Engster <deng@randomsample.de>
>>>> Date: Sun, 09 Jun 2013 00:04:57 +0200
>>>>
>>>> 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?
>>>
>>> Yes, this is by design.
>>
>> So the only way to have Emacs cover the entire screen without window
>> decorations is to use a font which fits?
>
> Actually, even that does not seem to work. If I set the '8x16' font in
> the new frame and then switch to fullscreen, it can show only 47 lines
> instead of 48 on a 1366x768 display. What is taking up the space down
> there?
>
> -David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
2013-06-09 9:14 ` Jan Djärv
@ 2013-06-09 9:40 ` David Engster
2013-06-09 12:47 ` chad
0 siblings, 1 reply; 13+ messages in thread
From: David Engster @ 2013-06-09 9:40 UTC (permalink / raw)
To: Jan Djärv; +Cc: Eli Zaretskii, emacs-devel
Jan Djärv writes:
> Internal or external border width probably.
Yep. See my other mail 2 minutes before yours. :-)
And yes, I'm working on X11. So I'm now back at how to choose the right
font for a real fullscreen frame. I guess "5x8" should be OK for almost
all common resolutions, but I can't be sure. So the question remains if
I can somehow fake this... The optimum would be a fake font with 1 pixel
height. :-)
Thanks,
-David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
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
0 siblings, 2 replies; 13+ messages in thread
From: chad @ 2013-06-09 12:47 UTC (permalink / raw)
To: David Engster; +Cc: emacs-devel@gnu.org Development
On 09 Jun 2013, at 02:40, David Engster <deng@randomsample.de> wrote:
> And yes, I'm working on X11. So I'm now back at how to choose the right
> font for a real fullscreen frame. I guess "5x8" should be OK for almost
> all common resolutions, but I can't be sure. So the question remains if
> I can somehow fake this... The optimum would be a fake font with 1 pixel
> height. :-)
You might see if modern X11 systems still recognize the font `nil2'.
~Chad
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
2013-06-09 12:47 ` chad
@ 2013-06-09 15:52 ` Thien-Thi Nguyen
2013-06-09 18:42 ` David Engster
1 sibling, 0 replies; 13+ messages in thread
From: Thien-Thi Nguyen @ 2013-06-09 15:52 UTC (permalink / raw)
To: chad; +Cc: David Engster, emacs-devel@gnu.org Development
() chad <yandros@MIT.EDU>
() Sun, 9 Jun 2013 05:47:26 -0700
On 09 Jun 2013, at 02:40, David Engster <deng@randomsample.de> wrote:
> And yes, I'm working on X11. So I'm now back at how to choose the right
> font for a real fullscreen frame. I guess "5x8" should be OK for almost
> all common resolutions, but I can't be sure. So the question remains if
> I can somehow fake this... The optimum would be a fake font with 1 pixel
> height. :-)
You might see if modern X11 systems still recognize the font `nil2'.
a righteous font once spoke to me thus:
"make me your default, i'll give you no fuss!"
spake did i the incantations,
"make" did try the instantiations,
result? eye-torture and mouth filled w/ cuss.
thi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
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
1 sibling, 1 reply; 13+ messages in thread
From: David Engster @ 2013-06-09 18:42 UTC (permalink / raw)
To: chad; +Cc: emacs-devel@gnu.org Development
chad writes:
> On 09 Jun 2013, at 02:40, David Engster <deng@randomsample.de> wrote:
>
>> And yes, I'm working on X11. So I'm now back at how to choose the right
>> font for a real fullscreen frame. I guess "5x8" should be OK for almost
>> all common resolutions, but I can't be sure. So the question remains if
>> I can somehow fake this... The optimum would be a fake font with 1 pixel
>> height. :-)
>
> You might see if modern X11 systems still recognize the font `nil2'.
Actually yes, nil2 is still there, but I cannot use it in Emacs for some
reason. 'xterm -fn nil2' works, and I see that nil2 is an alias for
-misc-nil-medium-r-normal--2-20-75-75-c-10-misc-fontspecific
but Emacs tells me
'Font `nil2' is not defined'.
-David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
2013-06-09 18:42 ` David Engster
@ 2013-06-10 16:10 ` David Engster
0 siblings, 0 replies; 13+ messages in thread
From: David Engster @ 2013-06-10 16:10 UTC (permalink / raw)
To: emacs-devel@gnu.org Development
David Engster writes:
> chad writes:
>> On 09 Jun 2013, at 02:40, David Engster <deng@randomsample.de> wrote:
>>
>>> And yes, I'm working on X11. So I'm now back at how to choose the right
>>> font for a real fullscreen frame. I guess "5x8" should be OK for almost
>>> all common resolutions, but I can't be sure. So the question remains if
>>> I can somehow fake this... The optimum would be a fake font with 1 pixel
>>> height. :-)
>>
>> You might see if modern X11 systems still recognize the font `nil2'.
>
> Actually yes, nil2 is still there, but I cannot use it in Emacs for some
> reason. 'xterm -fn nil2' works, and I see that nil2 is an alias for
>
> -misc-nil-medium-r-normal--2-20-75-75-c-10-misc-fontspecific
>
> but Emacs tells me
>
> 'Font `nil2' is not defined'.
I've found a good replacement by using a xft font with very small
height: "Bitstream Charter" with height '20' is 1 pixel wide and 4
pixels high. Everything below 11 makes Emacs segfault with a floating
point exception (should I submit a report about this? I think there was
already one, but I cannot find it).
The only thing still bothering me is the rightmost column that is
reserved for the truncation/continuation character. I already tried
setting it to 'zero-width' through glyphless-char-display, but that does
not work. Can I somehow reclaim the rightmost column, or is this fixed?
-David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
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:55 ` Jan Djärv
2013-06-09 15:54 ` Eli Zaretskii
1 sibling, 1 reply; 13+ messages in thread
From: Jan Djärv @ 2013-06-09 6:55 UTC (permalink / raw)
To: David Engster; +Cc: emacs-devel
Hello.
9 jun 2013 kl. 00:04 skrev David Engster <deng@randomsample.de>:
> 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?
You don't say what window system you are running, but for X at least, the window manager does not allow resizing of a fullscreen window. This is kind of the point of having fullscreen windows, i.e. fixed size covering the screen. For NS, it behaves the same. I guess W32 does the same thing, but I don't know for sure.
Jan D.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Emacs fullscreen and sizes in frame parameters
2013-06-09 6:55 ` Jan Djärv
@ 2013-06-09 15:54 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2013-06-09 15:54 UTC (permalink / raw)
To: Jan Djärv; +Cc: deng, emacs-devel
> From: Jan Djärv <jan.h.d@swipnet.se>
> Date: Sun, 9 Jun 2013 08:55:52 +0200
> Cc: emacs-devel@gnu.org
>
> You don't say what window system you are running, but for X at least, the window manager does not allow resizing of a fullscreen window. This is kind of the point of having fullscreen windows, i.e. fixed size covering the screen. For NS, it behaves the same. I guess W32 does the same thing, but I don't know for sure.
W32 behaves the same.
^ 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).