From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#46827: Broken initial size of GTK3 frame Date: Sat, 15 May 2021 09:56:55 +0200 Message-ID: <10ef4ab8-f7a3-73d5-7ce0-b7ff47443b6c@gmx.at> References: <6caa020a-084c-e3f2-7a34-262f7127b21b@gmx.at> <874kfk50f4.fsf@mail.linkov.net> <7e503d11-5cd0-9ed7-e75a-5977eb5ecf3a@gmx.at> <3096e1f1-0090-5892-c752-bd82d974214e@gmx.at> <871ranagzo.fsf@mail.linkov.net> <9736f3c8-157c-423d-55ad-21118c48d939@gmx.at> <93f1d912-a26f-ccf9-926b-731ad02d7734@gmx.at> <87sg32chgv.fsf@mail.linkov.net> <63e9cb33-afc0-8e9c-4e35-78f5e504eb47@gmx.at> <87h7jhgiqs.fsf@mail.linkov.net> <87o8dmppdn.fsf@mail.linkov.net> <6565dd1a-5933-00e3-4427-c713aa36d6d5@gmx.at> <87r1iexuoc.fsf@mail.linkov.net> <8735utyyla.fsf@mail.linkov.net> <62983626-60c1-5d8b-7ad6-67c65b408195@gmx.at> <87y2cjvp2s.fsf@mail.linkov.net> <7f7d8029-1b32-fae7-837a-fe0c65281510@gmx.at> <874kf6sq8p.fsf@mail.linkov.net> <74ceb571-7fbb-f018-8c29-41cc1d3785d0@gmx.at> <87tun58bj2.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6566"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46827@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 10:00:05 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 1lhpDR-0001bA-BD for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 10:00:05 +0200 Original-Received: from localhost ([::1]:41498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhpDQ-0000h7-Cl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 04:00:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhpBT-0006QD-2v for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 03:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35908) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhpBR-0002wO-Qi for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 03:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhpBR-0001y1-R3 for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 03:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 May 2021 07:58:01 +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.16210654237478 (code B ref 46827); Sat, 15 May 2021 07:58:01 +0000 Original-Received: (at 46827) by debbugs.gnu.org; 15 May 2021 07:57:03 +0000 Original-Received: from localhost ([127.0.0.1]:47450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhpAV-0001wY-J3 for submit@debbugs.gnu.org; Sat, 15 May 2021 03:57:03 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:59211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhpAU-0001vx-NJ for 46827@debbugs.gnu.org; Sat, 15 May 2021 03:57:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621065416; bh=YUSTEk6M4EKLU92rNqZdUx85m+n3798iAfoqPKpxyj8=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=EXXK5/uB5iDsXeTEol47rYPu3J4eleEaMuRa9SvPhqjl1NfyGIPBR5nrHuDcJhW6B Rq6nxz09d3hUPFDhZeA2PcrDZbRn70Xy5pBMX5VhHu5cUy1gTpoz+v4Px+eNbDNvTY M+2WnfQpDH3ESKpYqe7IO9ebEUPTqW4ewa2H0Dk8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([46.125.249.41]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MOzSu-1lrcmq2i7A-00PPBa; Sat, 15 May 2021 09:56:56 +0200 In-Reply-To: <87tun58bj2.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:wtplheE4Z/jd+poizMUhQ0zHLuqHoM/35SBi7yPVSNlHC8avdQu iEoRv+W48bkKV7ilz6sPvG8FOfLN3TJqFp9XErtt2mIZ/j7+JzOah2FkiA0ZO+eW/+dMbPy uJo2un3BQ+YwFQrm8Cc7cJYJqrWEnEHQM6XGNGoYF1O3mW3s4y9hdT/lO2cucbfYak3E+9e 511oNJ6mxSrVih0Z+5mtg== X-UI-Out-Filterresults: notjunk:1;V03:K0:rjv4jZhqDts=:LhX100C+uEFQIt/k/Pex24 anZamHlKYTPFIn1yRwasy3D2ll219S39kRTOE0n1VeRc/r/wfTeRc3vUopRcxlRkh0F/BIeXx 1kZBkE5i8lljf9117AdWDSO9LTRb9RtFFuuRqZFO5/nYCDZdEInm4koZDRTCmz31R7V+7j1xY hxvX6cqQbMNClA0ePPDJXCbZQlk5VyPqmNn9E7N16+pFQabkIN65OFS5nZ6uo7rKaXxPKFOg6 RPdr7wa1P1WNSnuz8Au+FXsbCBI4HcI2pnk5/bxucbVGOLgMK57FaVAvL3thWqf3RYLFbcerO HttHZM+B1bd2JtKLI6psLYxh8vshsbDzBqE8W1ZWKWCSeJuOKuvz7MXeBKkctCT04PhLS7Bcj 1y/QG/0bIXpiH1RclvXZ42X8k1XdAJmhKYVxDk46XMjqzxeAahzflZKkJdC1KLAW9mTf5xwPm T4XSjcp+bhZTLadDQVZDuA9rd9WPFl7ySkJW2M6Z2WN3BL0xnbvpDk29tY+tyrjIbPT/BVtxz voTqDAa5LUa8SqSksLuNLBuEGBfywEk1GOV8Q42fBcbas+ebcxSgf4aKReY6yUpyBufoNt6pG lKEZ4/nerdqMhb2idv3lL5gxgepi+Hm/6kgXQb2lRGHh6jY0MXWZ0dxbQAokvJgQlfjW3H2IJ LR8MZNRWDC5L6AKIHzeFYzQqIQqYNSLMd1ocuRP72PNyYOGAWFv/C2TiCoW2f0g6ZPpUqzK5a axD2f+qLS7JilVfzIoTM5i7aLtwOdavGwFdxf8Dmu367UpxXGIC/xuMJb9GfXqfqy7SRpCns 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:206569 Archived-At: >> What does your patch fix? > > There are no more oscillations between 1 and 2 on a GUI. > >> With a sufficiently small default font this will still return a value > 1. > > I use very small font, and the value is always 1. Only when the tab bar > is wrapped, the value becomes 2. I merely referred to the tool bar whose height (especially on KDE) often exceeds that of the default font by more than 2. For the tab bar, try to scale the tab-bar face by a factor of 2.0 or increase the height of the `variable-pitch' face. >> In either case, the height of the frame's inner rectangle plus those >> of internal tab, tool and menu bar should equal the height of the >> native rectangle in lines. Did you check that? > > I don't know how to check this. I doubt that we do it correctly now. There's a check that tries to make window sizes in lines and columns sum up correctly but there's no such check for the frame decorations IIRC. >> In my experience, there's no way to make column/line based variables and >> functions always DTRT on a GUI. Code should avoid them. > > Is it possible to avoid this when tab-bar-lines are calculated? IIUC we have two ways to calculate tab-bar-lines in a logically correct way: Have the display engine do it explicitly whenever it detects that a tab-bar line is wrapped or implicitly by inspecting the glyph matrix after the display engine is done with the tab bar. A similar approach can be used for the tool bar on Lucid/Motif/Windows and both tool and menu bar on builds without toolkit support. martin