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

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

bug#18215: 24.4.50; OSX 10.6.8; set-frame-size by pixelwise does not wor


From: Keith David Bershatsky
Subject: bug#18215: 24.4.50; OSX 10.6.8; set-frame-size by pixelwise does not work following `make-fame`.
Date: Sun, 17 Aug 2014 11:29:24 -0700
User-agent: / () / () APEL/10.8 Emacs/24.4.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO)

Yes, using the settings of

    (add-to-list 'default-frame-alist '(left-fringe . 17))
    (set-frame-size (selected-frame) 1899 1054 t)

results in this printout for `window--dump-frame`:

frame pixel: 1920 x 1058   cols/lines: 174 x 52   units: 11 x 20
frame text pixel: 1899 x 1054   cols/lines: 172 x 52
tool: 0  scroll: 0/0  fringe: 17  border: 2  right: 0  bottom: 0

#<window 3 on .scratch>   parent: nil
pixel left: 0   top: 0   size: 1916 x 1034   new: 0
char left: 0   top: 0   size: 174 x 51   new: 0
normal: 1.0 x 1.0   new: 0
body pixel: 1899 x 996   char: 172 x 49
width left fringe: 17  left margin: 0  right margin: 0
width right fringe: 0  scroll-bar: 0  divider: 0
height header-line: 22  mode-line: 16  divider: 0

#<window 4 on  *Minibuf-0*>   parent: nil
pixel left: 0   top: 1034   size: 1916 x 20   new: 0
char left: 0   top: 51   size: 1916 x 1   new: 0
normal: 1.0 x 1.0   new: 0
body pixel: 1899 x 20   char: 172 x 1
width left fringe: 17  left margin: 0  right margin: 0
width right fringe: 0  scroll-bar: 0  divider: 0
height header-line: 0  mode-line: 0  divider: 0

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

There is a green button in the upper left-hand corner of the frame on OSX, 
which will maximize the frame.  With the patched nsterm.m from August 15, 2014, 
the green button maximization still leaves out four (4) pixels from the height 
-- i.e., should be 1058 instead of 1054.  I verified the 4 pixel shortfull with 
an applescript to measure the Emacs frame size, which is 1920 x 1076 instead of 
1920 x 1080.  I don't understand why `1058` is Emacs' way of saying `1080 
pixels` in height, but that is how it works.  It sure would be easier to 
understand if Emacs could report the actual frame size in pixel height, like it 
does for width -- i.e., if the actual frame height in pixels is 1076, then 
Emacs should report 1076 (instead of 1054).

frame pixel: 1920 x 1054   cols/lines: 174 x 52   units: 11 x 20
frame text pixel: 1905 x 1050   cols/lines: 173 x 52
tool: 0  scroll: 0/0  fringe: 11  border: 2  right: 0  bottom: 0

#<window 3 on *GNU Emacs*>   parent: nil
pixel left: 0   top: 0   size: 1916 x 1030   new: 0
char left: 0   top: 0   size: 174 x 51   new: 0
normal: 1.0 x 1.0   new: 0
body pixel: 1905 x 1010   char: 173 x 50
width left fringe: 11  left margin: 0  right margin: 0
width right fringe: 0  scroll-bar: 0  divider: 0
height header-line: 0  mode-line: 20  divider: 0

#<window 4 on  *Minibuf-0*>   parent: nil
pixel left: 0   top: 1030   size: 1916 x 20   new: 0
char left: 0   top: 51   size: 1916 x 1   new: 0
normal: 1.0 x 1.0   new: 0
body pixel: 1905 x 20   char: 173 x 1
width left fringe: 11  left margin: 0  right margin: 0
width right fringe: 0  scroll-bar: 0  divider: 0
height header-line: 0  mode-line: 0  divider: 0

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

I am able to launch Emacs using GDB, and have used it on just one (1) occasion 
to submit a crash report of an issue not related to this current bug report.

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

Keith

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

At Sun, 17 Aug 2014 12:12:46 +0200,
martin rudalics wrote:
> 
>  > The following `window--dump-frame` printout was based on an UN-patched
>  > version of Emacs Trunk built on August 15, 2014 using the following
>  > settings.  The frame fills the entire screen, and is what I consider
>  > to be perfect.
>  >
>  >      (setq frame-resize-pixelwise t)
>  >
>  >      (set-face-attribute 'default (selected-frame) :font 
> "-*-Courier-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1")
>  >
>  >      (menu-bar-mode -1)
>  >
>  >      (tool-bar-mode -1)
>  >
>  >      (add-to-list 'default-frame-alist '(left-fringe . 11))
>  >
>  >      (add-to-list 'default-frame-alist '(right-fringe . 0))
>  >
>  >      (add-to-list 'default-frame-alist '(vertical-scroll-bars . nil))
>  >
>  >      (setq ns-auto-hide-menu-bar t)
>  >
>  >      (set-frame-position (selected-frame) 0 0)
>  >
>  >      (set-frame-size (selected-frame) 1905 1054 t)
>  >
>  > frame pixel: 1920 x 1058   cols/lines: 174 x 52   units: 11 x 20
>  > frame text pixel: 1905 x 1054   cols/lines: 173 x 52
>  > tool: 0  scroll: 0/0  fringe: 11  border: 2  right: 0  bottom: 0
> 
> Just for checking: If you change the following two forms
> 
> (add-to-list 'default-frame-alist '(left-fringe . 11))
> (set-frame-size (selected-frame) 1905 1054 t)
> 
> to say
> 
> (add-to-list 'default-frame-alist '(left-fringe . 17))
> (set-frame-size (selected-frame) 1899 1054 t)
> 
> do you still get the same value for the frame pixel width, namely 1920?
> 
>  > The following `window--dump-frame` printout was based on a PATCHED
>  > (nsterm.m 08/15/2014) version of Emacs Trunk built on August 15, 2014
>  > using the following settings, and then manually typing `M-x
>  > toggle-frame-maximzed` after startup.  The width is now perfect (i.e.,
>  > 1920).  The height is almost perfect -- i.e., 1054 -- it looks like
>  > about 2 pixels to the top of the screen are not filled, and about 2
>  > pixels to the bottom of the screen are not filled.
>  >
>  >      (setq frame-resize-pixelwise t)
>  >
>  >      (set-face-attribute 'default (selected-frame) :font 
> "-*-Courier-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1")
>  >
>  >      (menu-bar-mode -1)
>  >
>  >      (tool-bar-mode -1)
>  >
>  >      (add-to-list 'default-frame-alist '(left-fringe . 11))
>  >
>  >      (add-to-list 'default-frame-alist '(right-fringe . 0))
>  >
>  >      (add-to-list 'default-frame-alist '(vertical-scroll-bars . nil))
>  >
>  >      (setq ns-auto-hide-menu-bar t)
>  >
>  > frame pixel: 1920 x 1054   cols/lines: 174 x 52   units: 11 x 20
>  > frame text pixel: 1905 x 1050   cols/lines: 173 x 52
>  > tool: 0  scroll: 0/0  fringe: 11  border: 2  right: 0  bottom: 0
> 
> I don't understand how these get calculated:
> 
> (* 11 174) gets me 1914.  Add 4 pixels for the internal border gets me
> 1918.  Where do those two pixels missing to 1920 go to or come from?
> 
> (* 20 52) gets me 1040.  Add 4 pixels for the internal border gets me
> 1044.  10 pixels missing to 1054 for what?
> 
> Do you have any means to trigger maximization from the window manager
> via some sort of maximize button?
> 
> BTW, can you run Emacs under GDB?
> 
> martin





reply via email to

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