[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: Wed, 13 Aug 2014 08:23:03 +0200

> Thank you for the new patch.  I was able to successfully apply the new
> patch for 'nsterm.m` to a version of Emacs Trunk downloaded tonight
> (08/12/2014).  I also tried patching the previous file for `nsfns.m`,
> but received a message that the patch had already been applied.

Jan applied it as revision 117687 with the slightly misleading commit
message: "Fix default width not being 80, but 77."

> After patching `nsterm.m` and building Emacs Trunk downloaded tonight
> (08/12/2014), I was not able to set the frame size to 1920 using any
> of the settings previously mentioned relating to bug 18215.  I was
> able to achieve a little less than 1920 or several pixels more than
> 1920, but not exactly 1920.

Do you mean with `set-frame-size' and PIXELWISE non-nil?  I have no idea
how size hints work on OSX so that's easily possible.  Around line 5843
nsterm.m has these three lines

          sz.width = FRAME_COLUMN_WIDTH (emacsframe);
          sz.height = FRAME_LINE_HEIGHT (emacsframe);
          [win setResizeIncrements: sz];

These seem to say that resize increments should happen in multiples of
the frame's character sizes.  Note that in Lisp you get the values of
FRAME_LINE_HEIGHT and FRAME_COLUMN_WIDTH via `frame-char-height' and
`frame-char-width' respectively.

So if you did something like

          sz.width = 1;
          sz.height = 1;
          [win setResizeIncrements: sz];

instead, this should tell your window manager to resize your frame in
increments of 1 pixel instead.  You should be able to try this out by
mouse-dragging the edge of a frame after such change.

But I'm not sure what happens when you omit the

          [win setResizeIncrements: sz];

entirely as in the diffs I sent you.  It might leave the hint values at
some earlier default which inhibits pixelwise resizing.

Note that nsterm.c also has two occurrences of setResizeIncrements in
toggleFullScreen.  I'm not sure whether these apply for getting the
entire screen estate.  You could try to replace around line 6462

  sz.width = FRAME_COLUMN_WIDTH (f);
  sz.height = FRAME_LINE_HEIGHT (f);


  sz.width = 1;
  sz.height = 1;

and look whether maximizing works as expected then.


reply via email to

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