GNU bug report logs - #16013
24.3.50; Rows in height is interpreted as pixels.

Previous Next

Package: emacs;

Reported by: Jan Djärv <jan.h.d <at> swipnet.se>

Date: Sat, 30 Nov 2013 13:10:01 UTC

Severity: normal

Tags: moreinfo

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #65 received at 16013 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: "16013 <at> debbugs.gnu.org" <16013 <at> debbugs.gnu.org>
Subject: Re: bug#16013: 24.3.50; Rows in height is interpreted as pixels.
Date: Wed, 04 Dec 2013 19:06:26 +0100
[Message part 1 (text/plain, inline)]
> Lucid/Motif: 46 rows, 74 columns on initial frame,
>             50 rows, 80 columns on subsequent frames.

I don't know which libraries are needed to build with Lucid.  I
installed open motif libraries but the build script doesn't appreciate
them.  So I can't test these here.  At least the "subsequent frames"
look correct.

> No toolkit: 45 rows, 68 columns on initial frame,
>                  47 rows, 75 columns on subsequent frames.

This can be fixed here using the attached patch.  But with a frame width
of 60 the echo area should resize but disappears on the initial frame.
I don't yet know why.

> Gtk+3 and 2: 49 rows, 80 columns on initial frame.
>                 49 rows, 80 columns on subsequent frames.

martin
[x_set_frame_size.diff (text/plain, inline)]
=== modified file 'src/xterm.c'
--- src/xterm.c	2013-12-03 11:33:13 +0000
+++ src/xterm.c	2013-12-04 16:37:35 +0000
@@ -8552,12 +8552,15 @@
 
   compute_fringe_widths (f, 0);
 
-  pixelwidth =
-    (pixelwise ? width : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width))
-    + FRAME_TOOLBAR_WIDTH (f);
-  pixelheight =
-    (pixelwise ? height : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))
-    + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+  pixelwidth = ((pixelwise
+		 ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width)
+		 : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width))
+		+ FRAME_TOOLBAR_WIDTH (f));
+  pixelheight = ((pixelwise
+		  ? FRAME_TEXT_TO_PIXEL_HEIGHT (f, height)
+		  : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))
+		 + FRAME_MENUBAR_HEIGHT (f)
+		 + FRAME_TOOLBAR_HEIGHT (f));
 
   if (change_gravity) f->win_gravity = NorthWestGravity;
   x_wm_set_size_hint (f, (long) 0, 0);
@@ -8593,8 +8596,6 @@
   else
     {
       change_frame_size (f, width, height, 0, 1, 0, 1);
-      FRAME_PIXEL_WIDTH (f) = pixelwidth;
-      FRAME_PIXEL_HEIGHT (f) = pixelheight;
       x_sync (f);
     }
 }


This bug report was last modified 4 years and 257 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.