bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-f


From: Keith David Bershatsky
Subject: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame
Date: Fri, 04 Sep 2015 17:31:24 -0700

In my opinion, it would be useful to set the frame specifications exactly at 
the time of creation -- rather than fix it after the fact with `set-frame-size` 
using the pixelwise argument.

My particular immediate use case is to simply fill the screen exactly (on OSX, 
XP, and Windows 7).  In my testing, `toggle-frame-maximized` was never as 
accurate as `set-frame-size` using the pixelwise argument.  I would imagine 
there are other situations where a user may wish to create a frame with exact 
specifications to fit precisely into a specific location on the screen, without 
the need to fix it after the fact.

I have a test that identifies the current operating system and screen sizes on 
my different machines, and I have already determined exactly how many Emacs 
frame pixels fill the screen based on other factors such as font, fringe 
widths, no scroll bars, and no menu-bar.  The general approach has been to take 
the initial frame or subsequently created frames and use `set-frame-size` with 
the pixelwise argument to blow it up to the preferred size.  It sure would be 
nice, however, to set the pixel width/height along with the other frame 
parameters both programmatically (passing as parameters to `make-frame`), and 
as part of the `initial-frame-alist` and `default-frame-alist`.

I would still use `set-frame-size` with the pixelwise argument for functions 
where contraction/expansion of frames is needed -- e.g., I have a custom 
reduce-all-frame-size function and a custom maximize-all-frame-size function.  
That is handy for me to see other programs without completely hiding Emacs, and 
then to restore it again to full size when I'm done with those other programs.

I don't fully understand the floating point because the pixels are whole 
numbers, rather than decimals -- this is probably because I'm just a hobbyist, 
not a real programmer.  But yes, a frame-parameter for pixel width and pixel 
height would be awesome.

Last weekend, I learned how to build Emacs from any point in time based on a 
particular commit; and, I also learned the layman's way to download prebuilt 
nightlies from http://emacsformacosx.com/  I'd be happy to work on pinpointing 
when the intermittent flickering began, and will spend a little time on that 
project each day.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Fri, 04 Sep 2015 21:17:51 +0200,
martin rudalics wrote:
> 
>  > I am trying to do three things:
>  >
>  > (1) . . . 
> 
> Interesting.  This is the first time someone asks for this.  Do you have
> a particular use case?
> 
>  > (2) . . . 
> 
> We'd need a ‘pixel-width' and a ‘pixel-height' frame parameter.  When
> any of these is present, it would be used instead of the ‘width' and
> ‘height' parameters.  Alternatively, we could interpret floating point
> values of ‘width' and ‘height' specially.
> 
>  > (3) . . . 
> 
> Could you try bisecting to find out when this started?





reply via email to

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