From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16013: 24.3.50; Rows in height is interpreted as pixels. Date: Mon, 09 Dec 2013 19:26:38 +0100 Message-ID: <52A60B5E.5020603@gmx.at> References: <5579FC36-5F75-4679-87F6-048C5B7326F6@swipnet.se> <5299FD88.2090600@gmx.at> <529A33F4.5030606@swipnet.se> <529B0519.3010902@gmx.at> <529B1C71.9020707@gmx.at> <529CCE48.9090404@gmx.at> <529D8F3E.30400@gmx.at> <93EF122E-7EFC-4ACF-A216-E83981DD511A@swipnet.se> <529E2441.8030808@gmx.at> <9E083836-7DF3-4AC3-8711-A0E4757C9691@swipnet.se> <01BCA22D-62F2-4F04-B14C-85452A9D1201@swipnet.se> <529F6F22.4020803@gmx.at> <52A36085.4000608@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030207070608000205050309" X-Trace: ger.gmane.org 1386614178 20088 80.91.229.3 (9 Dec 2013 18:36:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Dec 2013 18:36:18 +0000 (UTC) Cc: "16013@debbugs.gnu.org" <16013@debbugs.gnu.org> To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 09 19:36:23 2013 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 1Vq5gs-0003Aq-EC for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Dec 2013 19:36:22 +0100 Original-Received: from localhost ([::1]:45415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vq5gs-0003Pn-0Q for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Dec 2013 13:36:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vq5gg-0003OW-Bo for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2013 13:36:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vq5gZ-00055k-0h for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2013 13:36:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vq5gY-00055e-TR for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2013 13:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vq5gY-0002ZG-DI for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2013 13:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Dec 2013 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16013 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16013-submit@debbugs.gnu.org id=B16013.13866141609857 (code B ref 16013); Mon, 09 Dec 2013 18:36:02 +0000 Original-Received: (at 16013) by debbugs.gnu.org; 9 Dec 2013 18:36:00 +0000 Original-Received: from localhost ([127.0.0.1]:40520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vq5gV-0002Yu-Bh for submit@debbugs.gnu.org; Mon, 09 Dec 2013 13:35:59 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:63440) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vq5gS-0002Yl-0a for 16013@debbugs.gnu.org; Mon, 09 Dec 2013 13:35:57 -0500 Original-Received: from [62.47.60.229] ([62.47.60.229]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MI4yc-1Vqd761aMo-003wbp for <16013@debbugs.gnu.org>; Mon, 09 Dec 2013 19:35:54 +0100 In-Reply-To: <52A36085.4000608@swipnet.se> X-Provags-ID: V03:K0:dssIIBe1qJ+XdsWPOhG7F1l2GHzifxg21vmBod+p2s6QcYRJSkw nlz7GOjPAioaNa/asw+23e/1hH2PkAEq4CZ4WRpZbZjXcyF8cGDQ6kNbQVGx1lMcEeSsjO0 AAPXHV9v5pX/HR+H5H98pvdL8WImQC78U6p1pJOHedBdAtmBDsxTW0iy/n2Xl4YrY90P89E SVNnK2as+VqnUIr4E5rHA== 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: 140.186.70.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:81655 Archived-At: This is a multi-part message in MIME format. --------------030207070608000205050309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I now managed to get the correct number of lines here with the attached patch. Tested with GTK3, Lucid and without xtoolkit. Not tested with Motif. Please have a look. Thanks, martin --------------030207070608000205050309 Content-Type: text/plain; name="frame-height.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="frame-height.diff" martin@NOREST:~/emacs/quickfixes$ bzr diff === modified file 'src/dispnew.c' --- src/dispnew.c 2013-11-30 09:25:31 +0000 +++ src/dispnew.c 2013-12-09 10:20:26 +0000 @@ -5535,6 +5535,10 @@ manipulating video hardware. */ if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) FrameRows (FRAME_TTY (f)) = new_height; + + FRAME_LINES (f) = new_lines; + FRAME_TEXT_HEIGHT (f) = new_text_height; + FRAME_PIXEL_HEIGHT (f) = FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height); } if (new_text_width != FRAME_TEXT_WIDTH (f) @@ -5547,6 +5551,10 @@ if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) FrameCols (FRAME_TTY (f)) = new_cols; + SET_FRAME_COLS (f, new_cols); + FRAME_TEXT_WIDTH (f) = new_text_width; + FRAME_PIXEL_WIDTH (f) = FRAME_TEXT_TO_PIXEL_WIDTH (f, new_text_width); + #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) if (WINDOWP (f->tool_bar_window)) { @@ -5556,13 +5564,6 @@ #endif } - SET_FRAME_COLS (f, new_cols); - FRAME_LINES (f) = new_lines; - FRAME_TEXT_WIDTH (f) = new_text_width; - FRAME_TEXT_HEIGHT (f) = new_text_height; - FRAME_PIXEL_WIDTH (f) = FRAME_TEXT_TO_PIXEL_WIDTH (f, new_text_width); - FRAME_PIXEL_HEIGHT (f) = FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height); - { struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); int text_area_x, text_area_y, text_area_width, text_area_height; === modified file 'src/window.c' --- src/window.c 2013-12-08 03:07:11 +0000 +++ src/window.c 2013-12-09 17:25:35 +0000 @@ -4056,7 +4056,8 @@ r->top_line = FRAME_TOP_MARGIN (f); r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f); - if (new_pixel_size == old_pixel_size) + if (new_pixel_size == old_pixel_size + && XWINDOW (mini)->pixel_height == FRAME_LINE_HEIGHT (f)) return; else if (WINDOW_LEAF_P (r)) /* For a leaf root window just set the size. */ === modified file 'src/xfns.c' --- src/xfns.c 2013-12-03 17:22:05 +0000 +++ src/xfns.c 2013-12-09 17:34:22 +0000 @@ -3069,7 +3069,6 @@ happen. */ init_frame_faces (f); -#ifdef USE_GTK /* PXW: This is a duplicate from below. We have to do it here since otherwise x_set_tool_bar_lines will work with the character sizes installed by init_frame_faces while the frame's pixel size is still @@ -3078,12 +3077,8 @@ non-pixelwise code apparently worked around this because it had one frame line vs one toolbar line which left us with a zero root window height which was obviously wrong as well ... */ - width = FRAME_TEXT_WIDTH (f); - height = FRAME_TEXT_HEIGHT (f); - FRAME_TEXT_HEIGHT (f) = 0; - SET_FRAME_WIDTH (f, 0); - change_frame_size (f, width, height, 1, 0, 0, 1); -#endif /* USE_GTK */ + change_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), + FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1, 0, 0, 1); /* Set the menu-bar-lines and tool-bar-lines parameters. We don't look up the X resources controlling the menu-bar and tool-bar === modified file 'src/xterm.c' --- src/xterm.c 2013-12-07 23:04:10 +0000 +++ src/xterm.c 2013-12-09 17:39:28 +0000 @@ -6622,8 +6622,8 @@ cancel_mouse_face (f); } - FRAME_PIXEL_WIDTH (f) = event->xconfigure.width; - FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height; +/** FRAME_PIXEL_WIDTH (f) = event->xconfigure.width; **/ +/** FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height; **/ #endif /* not USE_GTK */ #endif @@ -7689,6 +7689,9 @@ FRAME_COLUMN_WIDTH (f) = font->average_width; FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font); + FRAME_TOOL_BAR_HEIGHT (f) = FRAME_TOOL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); + FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); + compute_fringe_widths (f, 1); /* Compute the scroll bar width in character columns. */ @@ -8541,13 +8544,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); XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), @@ -8582,8 +8587,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); } } martin@NOREST:~/emacs/quickfixes$ --------------030207070608000205050309--