unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 18215@debbugs.gnu.org
Subject: bug#18215: 24.4.50; OSX 10.6.8; set-frame-size by pixelwise does not work following `make-fame`.
Date: Sun, 10 Aug 2014 09:51:29 -0700	[thread overview]
Message-ID: <m2r40o8ezy.wl%esq@lawlist.com> (raw)
In-Reply-To: <m2wqakgn3d.wl%esq@lawlist.com>

With both Emacs versions (i.e., June 1, 2014 and the patched August 8, 2014) and a setting of `(setq ns-auto-hide-menu-bar t)`, the function `toggle-frame-maximized` leaves approximately 10 pixels at the top of the screen that are not filled and about 4 or more pixels to the right of the screen that are not filled.  The only method that I have discovered that can fill the screen entirely (without going into full-screen mode), is using `set-frame-size` with the pixelwise argument.  When not using `(setq ns-auto-hide-menu-bar t)`, there are still a few pixels that are not filled by the Emacs frame when using `toggle-frame-maximized`.

It would appear that `(setq-default left-fringe-width 10)` and `(setq-default right-fringe-width 0)` are geared towards the `window` settings, rather than the `frame` settings.  The default frame fringe settings can be seen visually in the minibuffer -- i.e., default fringe left and right are both 11 when not overriding the default settings with the `default-frame-alist`.  Rather than using `(setq-default left-fringe-width 10)` and `(setq-default right-fringe-width 0)`, I believe it would be better for me to use:

(add-to-list 'default-frame-alist '(left-fringe . 11))

(add-to-list 'default-frame-alist '(right-fringe . 0))

With those `default-frame-alist` settings, the same result can be achieved with both Emacs versions.

Keith

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

At Sun, 10 Aug 2014 11:19:28 +0200,
martin rudalics wrote:
> 
> Thanks for the dumps.  As I expected, the difference of 6 pixels is
> explained by the different values for the fringes, namely ...
> 
>  > Here is the `(window--dump-frame)` printout for the June 1, 2014 Emacs Trunk build:
>  >
>  >      frame pixel: 1920 x 1058   cols/lines: 174 x 52   units: 11 x 20
>  >      frame text pixel: 1894 x 1054   cols/lines: 172 x 52
>  >      tool: 0  scroll: 0  fringe: 22  border: 2  right: 0  bottom: 0
> 
> ... 22 pixels for the June build, and ...
> 
>  > Here is the `(window--dump-frame)` printout for the August 8, 2014 patched Emacs Trunk build:
>  >
>  >      frame pixel: 1914 x 1058   cols/lines: 175 x 52   units: 11 x 20
>  >      frame text pixel: 1894 x 1054   cols/lines: 172 x 52
>  >      tool: 0  scroll: 0/0  fringe: 16  border: 2  right: 0  bottom: 0
> 
> .... 16 pixels for the August build.  The reason for this is that the
> June build still rounds the fringe widths to the next multiple of the
> frame's character width which is listed as 11 in your dump (compare
> "units: 11 x 20") while the August build does not round any more.
> 
> Basically, you should be able to fix this problem in a more generic way
> either by maximizing the frame instead of calculating its sizes by hand
> or by making the calculations use terms like those used in
> `window--dump-frame' where you should see how the "pixel size" of a
> frame relates to its "text size".  In addition, you would have to
> platform-wise include the sizes of the outer borders and the frame
> decorations used by the respective window manager.  I plan to provide
> these values within Emacs but since I do no have access to all platforms
> this might still take some time.
> 
>  > Both of the printouts were made using the settings contained in the initial bug report.
> 
> It's not entirely clear to me how the values reported here relate to the
> values of
> 
>  >     (setq-default left-fringe-width 10)
>  >
>  >     (setq-default right-fringe-width 0)
> 
> you report later.  Do your fringes appear as if they had this width (10
> pixels for the left and 0 pixels for the right) or do they look as in
> the dump (8 pixels on the left and the right, I presume)?
> 
> martin





  parent reply	other threads:[~2014-08-10 16:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 18:40 bug#18215: 24.4.50; OSX 10.6.8; set-frame-size by pixelwise does not work following `make-fame` Keith David Bershatsky
2014-08-08  8:45 ` martin rudalics
2014-08-09 19:29 ` Keith David Bershatsky
2014-08-10  9:19   ` martin rudalics
2014-08-09 19:36 ` bug#18215: Fwd: " Keith David Bershatsky
2014-08-09 19:37 ` Keith David Bershatsky
2014-08-09 20:00 ` Keith David Bershatsky
2014-08-10 16:51 ` Keith David Bershatsky [this message]
2014-08-11  7:40   ` martin rudalics
2014-08-12  2:47 ` Keith David Bershatsky
2014-08-12 13:03   ` martin rudalics
2014-08-13  4:43 ` Keith David Bershatsky
2014-08-13  6:23   ` martin rudalics
2014-08-13 10:33     ` Jan D.
2014-08-13 12:21       ` martin rudalics
2014-08-13  4:49 ` Keith David Bershatsky
2014-08-14  3:44 ` Keith David Bershatsky
2014-08-15 15:52   ` martin rudalics
2014-08-16 23:35 ` Keith David Bershatsky
2014-08-17 10:12   ` martin rudalics
2014-08-17 18:29 ` Keith David Bershatsky
2014-08-18  8:31   ` martin rudalics
2017-09-02 17:44     ` bug#18215: [PATCH] Set frame size to actual requested size (bug#18215) Alan Third
     [not found] <m24mxnknho.wl%esq@lawlist.com>
2014-08-09  9:44 ` bug#18215: 24.4.50; OSX 10.6.8; set-frame-size by pixelwise does not work following `make-fame` martin rudalics
     [not found] <m2ha1l4nxl.wl%esq@lawlist.com>
2014-08-09 17:14 ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r40o8ezy.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=18215@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).