From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame Date: Sat, 19 Sep 2015 23:12:40 +0200 Message-ID: References: <55F5B9DF.5020001@gmx.at> <55F6860D.9060503@gmx.at> <55F6CE22.1070502@gmx.at> <55F705E6.1000609@gmx.at> <55F7D6F6.90801@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140feb6c393bb0520201be2 X-Trace: ger.gmane.org 1442697202 12758 80.91.229.3 (19 Sep 2015 21:13:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Sep 2015 21:13:22 +0000 (UTC) Cc: Keith David Bershatsky , 21415@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 19 23:13:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZdPRX-0002rP-Qs for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Sep 2015 23:13:12 +0200 Original-Received: from localhost ([::1]:47860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdPRW-0007Yc-Pj for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Sep 2015 17:13:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdPRS-0007Xy-Bd for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2015 17:13:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdPRP-0002OG-4M for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2015 17:13:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdPRP-0002OC-0p for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2015 17:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZdPRO-0006qJ-CQ for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2015 17:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Sep 2015 21:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21415 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21415-submit@debbugs.gnu.org id=B21415.144269716426277 (code B ref 21415); Sat, 19 Sep 2015 21:13:02 +0000 Original-Received: (at 21415) by debbugs.gnu.org; 19 Sep 2015 21:12:44 +0000 Original-Received: from localhost ([127.0.0.1]:37928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdPR5-0006pl-5N for submit@debbugs.gnu.org; Sat, 19 Sep 2015 17:12:43 -0400 Original-Received: from mail-vk0-f48.google.com ([209.85.213.48]:35169) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdPR2-0006pc-RG for 21415@debbugs.gnu.org; Sat, 19 Sep 2015 17:12:41 -0400 Original-Received: by vkao3 with SMTP id o3so46942463vka.2 for <21415@debbugs.gnu.org>; Sat, 19 Sep 2015 14:12:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hPq+jUkYVDRmxHwflEqaYIoHHlUQcV7AeI/AxyJJyC4=; b=ZnnqbEifUIc6EGOMws7D775XkU/6GJo2FyuOgOpknK/vJsmO9tjUw0wOVGR3ypKJu7 OMQEuhzP4/Aatxvd0KcTpN7Y+hySGXlHADfimsxUs6eWZMhFc6tY6GXn90V4W9stfbma B2V6dxjzYooodCAQgEoeolcEk08+EMEY0Guh4qDFel1qRSTv7hAwhXvIR/gwxR0dOEyc s27XgnFensf2J7jkITwA/ehRLPqIAVCtVmZoHV4JmIChfbhm8R/qn49zcaMANjWRcdxe LT5qRzhBzN4MBv5L9SqumL2IEALUJYzfVRLmA0S4en7/05yJ0cr5Jbmw4kcRSDVV4/ca BkKA== X-Received: by 10.31.147.129 with SMTP id v123mr8212602vkd.23.1442697160394; Sat, 19 Sep 2015 14:12:40 -0700 (PDT) Original-Received: by 10.31.139.21 with HTTP; Sat, 19 Sep 2015 14:12:40 -0700 (PDT) In-Reply-To: <55F7D6F6.90801@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106711 Archived-At: --001a1140feb6c393bb0520201be2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =3D FRAME_EXTERNAL_TOOL_BAR (f); int pixelwidth, pixelheight; int rows, cols;+ int orig_height =3D 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 =3D 0; else- wr.origin.y +=3D FRAME_PIXEL_HEIGHT (f) - pixelheight;+ wr.origin.y +=3D 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=C3=A4rv anymore (in fact, I mailed h= im 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 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 > --001a1140feb6c393bb0520201be2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Below is a patch that should correc= t the problem:

diff --git a/src/nsterm.m b/src/nsterm.m
index 2806f31..14f2beb 100644
--- a/src/nsterm.m<=
/span>
+++ b/src/nsterm.m
@@ -1333,6 +1333,7=
 @@ x_set_window_s=
ize (struct frame *f,
   int tb =3D FRAME_EXTERNAL_TOOL_BA=
R (f);
   int pixelwidth, pixelheight;
   int rows, cols;
+  int orig_height =3D wr.size.heigh=
t;
=20
   NSTRACE (x_set_window_size);
=20
@@ -1386,7 +1387,7=
 @@ x_set_window_s=
ize (struct frame *f,
  if (f->output_data.ns->zoomi=
ng)
    f->output_data.ns->zooming =3D 0;
  else
-   wr.origin.y +=3D FRAME_PIXEL_HEI=
GHT (f) - pixelheight;
+   wr.origin.y +=3D orig_height - w=
r.size.height;
=20
   [view setRows: rows andColumns: cols];
   [window setFrame: wr display: YES];
Effectively, this will ensure that whenever the height of a frame is change= d, the origin (the distance from the lower left corner of the display to th= e 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=C3= =A4rv anymore (in fact, I mailed him asking him for help and he replied tha= t 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 a= nyone know if there is a test case covering things like this? If not, one s= hould be implemented.

Sincerely,
=C2=A0=C2=A0=C2=A0 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.=C2=A0 External borders, tool bar and menu bar often mess = things
up.

martin

--001a1140feb6c393bb0520201be2--