[Top][All Lists]

[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: martin rudalics
Subject: bug#18215: 24.4.50; OSX 10.6.8; set-frame-size by pixelwise does not work following `make-fame`.
Date: Mon, 18 Aug 2014 10:31:44 +0200

> 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

This means that we internally resize pixelwise as needed.

> 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 suppose it's related to some extra calculations of the toolbar height
in nsterm.m.  For example here on GNUstep turning off the toolbar leaves
the entire space for it in the frame.

> 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-height' is a misnomer.  It returns the height of the frame
as the sum of the frame's text height (an abstraction inherited from
TTYs) plus the height of some objects Emacs handles internally (like the
internal border or an internal tool- or menubar).

Getting the screen estate of an Emacs frame (including things like title
bars or external borders) in a uniform manner for all platforms is not
entirely trivial.  I plan to provide a function to do that in the near
future.  Note, however, that maximized frames are usually positioned at
something like (-4, -4) to make the external border disappear and
inherently have variable size to make sure that parts of it don't get
hidden when changing the system taskbar.

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

That's good.  As soon as I understand what and where I'll probably ask
you to check some things.


reply via email to

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