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#19048: Frame height decreases at Emacs start Date: Wed, 19 Nov 2014 09:30:33 +0100 Message-ID: <546C5529.4070904@gmx.at> References: 5467354D.3000600@gmx.at <54675ED2.9030901@alice.it> <54676426.8030505@gmx.at> <54678AE4.6050304@alice.it> <54688C5F.9090201@gmx.at> <5468A04C.8020604@alice.it> <5468ACA1.2080007@gmx.at> <5468B1A7.1010804@alice.it> <5468B30F.6050206@gmx.at> <5468B5C4.7030709@alice.it> <5468BF55.8080306@gmx.at> <5469D468.2030304@alice.it> <5469EF37.4070202@alice.it> <546A3DA6.2000307@gmx.at> <546A5197.1040508@alice.it> <546AFA8A.2000408@gmx.at> <546B59FC.5020809@alice.it> <546B82F4.7050609@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090304080709060806090907" X-Trace: ger.gmane.org 1416385952 6317 80.91.229.3 (19 Nov 2014 08:32:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2014 08:32:32 +0000 (UTC) To: Angelo Graziosi , 19048@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 19 09:32:25 2014 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 1Xr0gZ-00050X-CC for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Nov 2014 09:32:23 +0100 Original-Received: from localhost ([::1]:56977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr0gW-00061y-RE for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Nov 2014 03:32:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr0gM-00061q-Ak for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 03:32:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr0gE-000312-Q4 for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 03:32:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr0gE-00030y-M1 for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 03:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xr0gE-0003BX-G0 for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2014 03:32: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: Wed, 19 Nov 2014 08:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19048 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19048-submit@debbugs.gnu.org id=B19048.141638586512173 (code B ref 19048); Wed, 19 Nov 2014 08:32:02 +0000 Original-Received: (at 19048) by debbugs.gnu.org; 19 Nov 2014 08:31:05 +0000 Original-Received: from localhost ([127.0.0.1]:37802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xr0fJ-0003AH-3A for submit@debbugs.gnu.org; Wed, 19 Nov 2014 03:31:05 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:50886) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xr0fG-00039u-44 for 19048@debbugs.gnu.org; Wed, 19 Nov 2014 03:31:03 -0500 Original-Received: from [194.166.86.209] ([194.166.86.209]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MfjJY-1XccXa2POm-00NDD7; Wed, 19 Nov 2014 09:30:38 +0100 In-Reply-To: <546B82F4.7050609@gmx.at> X-Provags-ID: V03:K0:jtVzVG05oGJDVN53+/gfn+pJ8BMt4FENbzrxXeBT7ziomvNg3RD AVz++1yFkCblH4bcM/eRj4udZKhVsEmK0kD+GkYSRhXmb1zz/vAxOUaoPnzq3vNCtfybkue 0UxUWemPggQt92BIXad1QJnFnk8/YseAdROrRJqaB3pBtmWd5aQm7+er6OAgK4+gZTgX2Y6 m2pySXA9J3XAi6QedtLHw== X-UI-Out-Filterresults: notjunk:1; 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:96221 This is a multi-part message in MIME format. --------------090304080709060806090907 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit >> BTW, I see the same issue in today build of Windows build (MSYS2-MinGW64)... Please try the attached patch. Thanks, martin --------------090304080709060806090907 Content-Type: text/plain; charset=windows-1252; name="x_set_tool_bar_lines.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="x_set_tool_bar_lines.patch" diff --git a/src/w32fns.c b/src/w32fns.c index 1b290b7..e514970 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -1721,15 +1721,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) else nlines = 0; - if (nlines == 0) - x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); - else - { - f->n_tool_bar_rows = 0; - FRAME_TOOL_BAR_LINES (f) = nlines; - adjust_frame_glyphs (f); - SET_FRAME_GARBAGED (f); - } + x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); } @@ -1749,11 +1741,7 @@ x_change_tool_bar_height (struct frame *f, int height) /* Recalculate tool bar and frame text sizes. */ FRAME_TOOL_BAR_HEIGHT (f) = height; FRAME_TOOL_BAR_LINES (f) = lines; -/** FRAME_TEXT_HEIGHT (f) **/ -/** = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/ -/** FRAME_LINES (f) **/ -/** = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/ - /* Store the `tool-bar-lines' and `height' frame parameters. */ + /* Store `tool-bar-lines' and `height' frame parameters. */ store_frame_param (f, Qtool_bar_lines, make_number (lines)); store_frame_param (f, Qheight, make_number (FRAME_LINES (f))); @@ -1772,6 +1760,10 @@ x_change_tool_bar_height (struct frame *f, int height) adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0, Qtool_bar_lines); + /* adjust_frame_size might not have done anything, garbage frame + here. */ + adjust_frame_glyphs (f); + SET_FRAME_GARBAGED (f); if (FRAME_X_WINDOW (f)) x_clear_under_internal_border (f); } diff --git a/src/xfns.c b/src/xfns.c index aaa75f2..59715d0 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1075,19 +1075,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) else nlines = 0; -#ifdef USE_GTK x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); -#else /* !USE_GTK */ - if (nlines == 0) - x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); - else - { - f->n_tool_bar_rows = 0; - FRAME_TOOL_BAR_LINES (f) = nlines; - adjust_frame_glyphs (f); - SET_FRAME_GARBAGED (f); - } -#endif /* USE_GTK */ } @@ -1124,10 +1112,6 @@ x_change_tool_bar_height (struct frame *f, int height) /* Recalculate tool bar and frame text sizes. */ FRAME_TOOL_BAR_HEIGHT (f) = height; FRAME_TOOL_BAR_LINES (f) = lines; -/** FRAME_TEXT_HEIGHT (f) **/ -/** = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/ -/** FRAME_LINES (f) **/ -/** = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/ /* Store the `tool-bar-lines' and `height' frame parameters. */ store_frame_param (f, Qtool_bar_lines, make_number (lines)); store_frame_param (f, Qheight, make_number (FRAME_LINES (f))); @@ -1153,6 +1137,10 @@ x_change_tool_bar_height (struct frame *f, int height) adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0, Qtool_bar_lines); + /* adjust_frame_size might not have done anything, garbage frame + here. */ + adjust_frame_glyphs (f); + SET_FRAME_GARBAGED (f); if (FRAME_X_WINDOW (f)) x_clear_under_internal_border (f); --------------090304080709060806090907--