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: Anders Lindgren
Subject: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame
Date: Sat, 19 Sep 2015 23:12:40 +0200

Hi,

Below is a patch that should correct the problem:

diff --git a/src/nsterm.m b/src/nsterm.m
index 2806f31..14f2beb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1333,6 +1333,7 @@ x_set_window_size (struct frame *f,
   int tb = FRAME_EXTERNAL_TOOL_BAR (f);
   int pixelwidth, pixelheight;
   int rows, cols;
+  int orig_height = wr.size.height;
 
   NSTRACE (x_set_window_size);
 
@@ -1386,7 +1387,7 @@ x_set_window_size (struct frame *f,
  if (f->output_data.ns->zooming)
    f->output_data.ns->zooming = 0;
  else
-   wr.origin.y += FRAME_PIXEL_HEIGHT (f) - pixelheight;
+   wr.origin.y += orig_height - wr.size.height;
 
   [view setRows: rows andColumns: cols];
   [window setFrame: wr display: YES];
Effectively, this will ensure that whenever the height of a frame is changed, the origin (the distance from the lower left corner of the display to the lower left hand corner of the frame) is updated accordingly.

Keith, please test this and see if it solves your problem with `make-frame'.

If it does then I suggest that we run it past whoever is in charge of the OS X port. Apparently, it's not Jan Djärv anymore (in fact, I mailed him asking him for help and he replied that he no longer was involved with Emacs).

I don't have write access to the Emacs repository, so someone would have to commit this for me, if it gets accepted.

By the way, do anyone know if there is a test case covering things like this? If not, one should be implemented.

Sincerely,
    Anders




On Tue, Sep 15, 2015 at 10:29 AM, martin rudalics <rudalics@gmx.at> wrote:
> I have a font that is an even multiple of the screensize, so I don't have a
> problem with that.

You're lucky.  External borders, tool bar and menu bar often mess things
up.

martin


reply via email to

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