From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#46827: Broken initial size of GTK3 frame Date: Mon, 03 May 2021 20:01:47 +0300 Organization: LINKOV.NET Message-ID: <871ranagzo.fsf@mail.linkov.net> References: <6caa020a-084c-e3f2-7a34-262f7127b21b@gmx.at> <871ratp19y.fsf@linkov.net> <36799c0d-a26b-a862-2b18-fb9bf9f3f30c@gmx.at> <87sg384r70.fsf@mail.linkov.net> <7471b198-a5ad-f79d-46fe-5498a299c964@gmx.at> <87eeerwvoq.fsf@mail.linkov.net> <9cde65ef-b150-121b-bd7f-5852406180c1@gmx.at> <87bl9uqjuq.fsf@mail.linkov.net> <874kfk50f4.fsf@mail.linkov.net> <7e503d11-5cd0-9ed7-e75a-5977eb5ecf3a@gmx.at> <3096e1f1-0090-5892-c752-bd82d974214e@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 46827@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 03 19:18:42 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldcDS-0002e4-Qq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 19:18:42 +0200 Original-Received: from localhost ([::1]:58958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldcDR-0007KQ-Ta for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 13:18:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldc0F-0003sR-0c for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 13:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldc0E-0008VT-JA for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 13:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldc0E-0000nB-Dy for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 13:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 May 2021 17:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46827 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 46827-submit@debbugs.gnu.org id=B46827.16200614963028 (code B ref 46827); Mon, 03 May 2021 17:05:02 +0000 Original-Received: (at 46827) by debbugs.gnu.org; 3 May 2021 17:04:56 +0000 Original-Received: from localhost ([127.0.0.1]:47569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldc08-0000mm-2z for submit@debbugs.gnu.org; Mon, 03 May 2021 13:04:56 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:53703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldc05-0000me-SO for 46827@debbugs.gnu.org; Mon, 03 May 2021 13:04:54 -0400 Original-Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 9994D240007; Mon, 3 May 2021 17:04:46 +0000 (UTC) In-Reply-To: <3096e1f1-0090-5892-c752-bd82d974214e@gmx.at> (martin rudalics's message of "Mon, 3 May 2021 18:51:52 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205536 Archived-At: > Please try it and tell me whether the frame size history (hoperemains empty > now. Tried it, and no flashes anymore, thanks! Here is the frame size history: Frame size history of # x_make_frame_visible set_window_configuration (4), MS=80x85 IH IV > What apparently happens is the following: x_set_tab_bar_lines (why?) > gets called all the time with a VALUE of 1 and translates that to > FRAME_LINE_HEIGHT (f) when calling x_change_tab_bar_height. So the > latter sets FRAME_TAB_BAR_HEIGHT (f) to FRAME_LINE_HEIGHT (f) which is > two pixels less than the height needed to display the tab bar. This > means we enlarge and move upwards the root window by two pixels and > later shrink and move it down when redisplay has calculated the new > size. > > The attached patch tries to fix that. Note that a simple > > nlines != olines > > is not sufficient since the tab bar occupies 2 lines while VALUE is 1. > > Maybe we should do a similar thing for the tool and/or menu bars (but I > recall that some builds do process a VALUE > 1 specially for them).