GNU bug report logs - #59547
28.2; The bottom border is not displayed when setting the pixel height of a child frame smaller than 1 line

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Yuwei Tian <fishtai0@HIDDEN>; dated Thu, 24 Nov 2022 16:32:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 59547 <at> debbugs.gnu.org:


Received: (at 59547) by debbugs.gnu.org; 29 Nov 2022 12:14:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 29 07:14:20 2022
Received: from localhost ([127.0.0.1]:54354 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozzVE-0007ve-04
	for submit <at> debbugs.gnu.org; Tue, 29 Nov 2022 07:14:20 -0500
Received: from mail-lf1-f48.google.com ([209.85.167.48]:43845)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fishtai0@HIDDEN>) id 1ozzVB-0007vX-AM
 for 59547 <at> debbugs.gnu.org; Tue, 29 Nov 2022 07:14:18 -0500
Received: by mail-lf1-f48.google.com with SMTP id d6so22170238lfs.10
 for <59547 <at> debbugs.gnu.org>; Tue, 29 Nov 2022 04:14:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :from:to:cc:subject:date:message-id:reply-to;
 bh=Qx+DuMDrgdqmK8/0x18P1dADJBqQtlC/zmgo3SImmJ8=;
 b=g9PbmcMYk6sG7gQw70XJH+yHNFLWiqiwv+R0E3YFb5PwfNIOHIKhYzt2nyqwttZbt8
 EfDsFqEIpiryuHXH2p/duucQs1XtQV5GtIqBwDAzSaU7E/VMtU+CHn8C9X7HPQzr2w4r
 I11RyJXcWPbyeIDAU1d80+WDzkq5cdGy3AJaBvKDZmuneXf2thjxuMBp+eNxXze2WErS
 E1jztiFFaODlcAUF0JKyVzgH6hMs9flp+KXu5euhX5zoZseGJ7NOdoDA/uliVUzQ3dl8
 p/LFz/E1PUjzMKxv7Lz0N/dlrsjnqVBnMy/HVUdAPziU1KnyCyU947QYDzQLkQFz/Dgg
 pYKg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=Qx+DuMDrgdqmK8/0x18P1dADJBqQtlC/zmgo3SImmJ8=;
 b=ybyylMTltsdlCwaihux8WltutVWdEtHQyqE0/LcZQ+fAt6wL5BbJEx1ppvzqfNPtdc
 TqUVGewOaA196+/i3NsmJWjWHMMg6wl9FqJsjrPyvEvr9g6UiHV+/HPO/2JSGT/G1JU2
 wqPQK4beot5D5pnkd06608ZMjVQakGgtGWpZ97b14QLltTXZ/GEtkfIZ9wgNPcjlpejP
 k/Jaq1pvRN0XiLyMeNjNVxx1ZXXP++adLO4kSomZlF815S9L/x9tTSvQq1XXaJwbd3vF
 wMkiCLVL3+oFISrlUTJjNakjPLTLbYA2A/1DuYmNU4kH6klHsg110c8CWdRkfJMGOzJ7
 tCcQ==
X-Gm-Message-State: ANoB5plR6Zr3gHa8fZukcVC1tG812miabRFUPgnueA4RB/RH7rrZXC6h
 XTCasPLt2efOGDF4UT3GShEA9BUW5VkW3GIfGf8=
X-Google-Smtp-Source: AA0mqf77xvKHHPBv1dkmSwUbNpsgnCxAEPj4W4eRHeQv8u4dU/nBOiw3S0vP0U3mUn+AkEsUA3tX/uOMc1BoS8isZhw=
X-Received: by 2002:ac2:5de5:0:b0:499:4f:2582 with SMTP id
 z5-20020ac25de5000000b00499004f2582mr6151731lfq.515.1669724051124; 
 Tue, 29 Nov 2022 04:14:11 -0800 (PST)
MIME-Version: 1.0
References: <CAC9=Ai=o8hjR_7U3aPWc2mdUUGrvzL8hSqTBe-bGBr6Lb-DyzA@HIDDEN>
 <57b46e7e-e1fd-774b-f39c-e55e9782398b@HIDDEN>
 <CAC9=AimeEzxTQG2ijsY105zdihGCvqD=8xxzBAnxZTLVn47j+A@HIDDEN>
 <9dca9cfe-eead-c4bf-9f7f-1df18cc6203f@HIDDEN>
In-Reply-To: <9dca9cfe-eead-c4bf-9f7f-1df18cc6203f@HIDDEN>
From: Yuwei Tian <fishtai0@HIDDEN>
Date: Tue, 29 Nov 2022 20:13:59 +0800
Message-ID: <CAC9=AinO=ds4c-WYHQ_okKXh9g9YkUzY_9KKZkmw8VVsgk5XkQ@HIDDEN>
Subject: Re: bug#59547: 28.2; The bottom border is not displayed when setting
 the pixel height of a child frame smaller than 1 line
To: martin rudalics <rudalics@HIDDEN>, 59547 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 59547
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

> Why don't you specify an appropriate font parameter like say
>
>            (make-frame
>             `((parent-frame . ,(window-frame))
>              (font . "-PfEd-DejaVu Sans Mono-regular-normal-normal-*-0
> 4-*-*-*-m-0-iso10646-1")
>              (no-accept-focus . t)

It works. Thanks so much.


On Tue, Nov 29, 2022 at 6:39 PM martin rudalics <rudalics@HIDDEN> wrote:
>
>  > The use case is to create a child frame with a height smaller than the
>  > default line height, because the character size in the child frame is
>  > set smaller than the default. How can this be achieved? Thanks.
>
> Why don't you specify an appropriate font parameter like say
>
>            (make-frame
>             `((parent-frame . ,(window-frame))
>              (font . "-PfEd-DejaVu Sans Mono-regular-normal-normal-*-04-*-*-*-m-0-iso10646-1")
>              (no-accept-focus . t)
>
> martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59547; Package emacs. Full text available.

Message received at 59547 <at> debbugs.gnu.org:


Received: (at 59547) by debbugs.gnu.org; 29 Nov 2022 10:39:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 29 05:39:33 2022
Received: from localhost ([127.0.0.1]:54251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozy1V-0006qC-FK
	for submit <at> debbugs.gnu.org; Tue, 29 Nov 2022 05:39:33 -0500
Received: from mout.gmx.net ([212.227.17.22]:41251)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1ozy1S-0006q5-Ud
 for 59547 <at> debbugs.gnu.org; Tue, 29 Nov 2022 05:39:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417;
 t=1669718364; bh=xWksS8M3nrwx7LV9X5uNP7ptyFFCIXd15XcZx+Nq62Q=;
 h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To;
 b=kaWdROvcz5BwtuwibxGtod5twQiWbT1j7RPOP0HBWiQNIGtk+Sg8IrC+/CesCaRV7
 Oj3XgTrNVhKDXlXsVPnksLdd2yJZ0kZ3k7UwR/bWn4bGU01BdtcS0dbzVxaBbT3tox
 x8zGnfHqf6UeZa3TpBQos1T2yfnPQkTpWXdU7r+b4SklmVs7l/zHdyN5c3BnCOzks6
 PNc1HYDctXQzGREpOJD9X3JaPzA9vpS1fJKYUCY/Qtc/QnacG8BGUAyuQkfU0ruENc
 OQzTieFVurtvP4X6XxGo4gS914bTTxkjChxOGvSS6KDo1t5ajUHpYxYYV3wlZu1r3X
 ZKFV3mWGdYoFQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.1.100] ([46.125.249.57]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MVeMG-1pPANs1UrU-00RWl4; Tue, 29
 Nov 2022 11:39:24 +0100
Message-ID: <9dca9cfe-eead-c4bf-9f7f-1df18cc6203f@HIDDEN>
Date: Tue, 29 Nov 2022 11:39:17 +0100
MIME-Version: 1.0
Subject: Re: bug#59547: 28.2; The bottom border is not displayed when setting
 the pixel height of a child frame smaller than 1 line
Content-Language: en-US
To: Yuwei Tian <fishtai0@HIDDEN>, 59547 <at> debbugs.gnu.org
References: <CAC9=Ai=o8hjR_7U3aPWc2mdUUGrvzL8hSqTBe-bGBr6Lb-DyzA@HIDDEN>
 <57b46e7e-e1fd-774b-f39c-e55e9782398b@HIDDEN>
 <CAC9=AimeEzxTQG2ijsY105zdihGCvqD=8xxzBAnxZTLVn47j+A@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAC9=AimeEzxTQG2ijsY105zdihGCvqD=8xxzBAnxZTLVn47j+A@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:UDRdkLGoLp5GMLHJ6M/ohUHhk4bFW4IuIQ3Kb1DC25opNhOg1df
 pHKHQTlQRrDu7L9tyiga3ozl2nbvH1L1en/7kiP4K1cWzc1rEbz/0Anhtk0tnpvr+MzdZqY
 6CLfKlolu5IHBL9UuUibZJfpIz5U6MAGvsEtywKVaJYTwwCMu4GeJM3LK4rwIVS8RUlQiw2
 Tv+/XBuKu5E/vDbzK0IRg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:W2q6NZoEFXE=;wk+APf5S2Q4Z9uaG5DY2h9h5eyl
 SLMndtr/wNnJYnvSyymjuUrmDDNTRO4MIU4hw8WIE4teopqB8PXvpx3ol4GRtWQEfYcJih/s6
 Tu7cgVDIrFN+vTIDvE1w35vfISH54voQhRjF3F4st3/HQVvmxNOLsQANWgwjSkRmjU+l++1Rq
 li3JvCw1Z1m7+pf8XD1mzNRKpQPVM6PjotqNbrAnmeMXND06euHvqlJEekBQLzbbQJ1o+Udtl
 PUPD46uCL+j6YbcE4lmu2Z7FGoZOCYeONjurOEqnxzDM+R8WRPTy/VSbUnX3gghyISK/AJJoa
 vhQQBlvBXvemrt+FYik4bNkvDRQM2ApJYZu8qHPjYwu9SF/gjqDG2Gsb0KtMdMh7KWlG2rufm
 F9eHpkr0n1P54MW3ZQKYBtP7M48mxXxhCh7NW1uwAf8MZhUU/uJhlr3nwzZw4aDpy4vLDqmud
 QKeDHtYLvjS2j2nIeUjuq+h/o0KF6KUsvIVmJCIaaSQGdXr0eGcLLGDUldizgzGj7/zrM1OTL
 r0P3r3FyvZRT5VzJjG7tXfUp1DPzDdKAd4dyGW/pKvXafzqHPIosYpbB7HJJaz5X9oj59grlM
 tX6gRzY2ehplPrqT+g3ctZpW3WL5+EIah5SnvO0RwycvdvwbLPTrGMmAb5Tbtpvcm0/5eWNXz
 PBJaSktQb76otJb+p9nc57MD0/TiWhzvFKBjNcr4l2kO3328ZEYYtvxulM9xw19O/f0TKm6QM
 7blFgSdiOieTXcmHNLAOotUfcvQgzAsjVjoineMftnhaWgDrd5jIcbUEgxgrQFfdaQWgDeBf2
 6VimQeGSofXZPNaKs31tBOSHOMar68SeIawwwlB8UutoFtDHqnSTm+LXy+FNOrh05nWhQlsmS
 0/Kcn85Hx3ED422sAR0vxDd6BJb1OegJnf0alo0egkX6khQ9l+17uHQMkWV38Qr0rSGTJVf3D
 b8dbX+a84Ff4dBpOKa1/mUgRpqA=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 59547
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > The use case is to create a child frame with a height smaller than the
 > default line height, because the character size in the child frame is
 > set smaller than the default. How can this be achieved? Thanks.

Why don't you specify an appropriate font parameter like say

           (make-frame
            `((parent-frame . ,(window-frame))
	     (font . "-PfEd-DejaVu Sans Mono-regular-normal-normal-*-04-*-*-*-m-0-iso10646-1")
	     (no-accept-focus . t)

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59547; Package emacs. Full text available.

Message received at 59547 <at> debbugs.gnu.org:


Received: (at 59547) by debbugs.gnu.org; 28 Nov 2022 14:02:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 28 09:02:29 2022
Received: from localhost ([127.0.0.1]:48796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozeiL-0004f7-0j
	for submit <at> debbugs.gnu.org; Mon, 28 Nov 2022 09:02:29 -0500
Received: from mail-lf1-f46.google.com ([209.85.167.46]:39690)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fishtai0@HIDDEN>) id 1ozeiJ-0004f1-9D
 for 59547 <at> debbugs.gnu.org; Mon, 28 Nov 2022 09:02:27 -0500
Received: by mail-lf1-f46.google.com with SMTP id f13so17477283lfa.6
 for <59547 <at> debbugs.gnu.org>; Mon, 28 Nov 2022 06:02:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :from:to:cc:subject:date:message-id:reply-to;
 bh=7ObIbpf9X0HPVvKu7/M7Nw9n2k311unBdLChbMHlKW8=;
 b=o4UkNuTSjYg8yYRVOqCXM/2xs9Eyk1nLMyd8ujakOodd1rOA75jo26qSLddhHSKq+g
 QN3eNHQDMHJC6Z9uikpoct9h+rscvoWJFMCrBNB6fcOvwdL4y+5kQ/YdHe9bHfxD5yt+
 0C4Kfb5buqyOIOjG1fkKr5hX7mH0dK4MQwuwTzrYCtM4BCubCY6aIiqiO26LFvpAnAki
 xnOVZ5uA4LFHAL+q6UURHlpPN1XruQWFgDxRD7wEh8CqwiWs8JjhiGleD8aS/5I4WlCk
 EfvvSDDvybHXIKg9l6EKsTqOnY0RTXC8aDknSDUD6BEelmzUswz4o28kKClLlKBTgQwV
 TDCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=7ObIbpf9X0HPVvKu7/M7Nw9n2k311unBdLChbMHlKW8=;
 b=Yoz1u46UbhPWX9SsmT/sPLMQXsbtQCOLXx2YoPZqx58lxL3qhew8+buBgH4K9zmLRW
 q7M53ryPoRoomO52QXyHkGkysTKpo7nnzyx9VYYy2eyFI6pU/EePdwXtPnVo957fcudD
 Msz9xX1jerBokUmjyccWhELEyAGDqkfk+VIGluiZC2JpNhenzUy9H6aptuM1GRoy4RJ/
 wx25Y0e55XDAFMufPiihYZc0tM0F8jUC6Yl2Ui2TI/oYZRz8g70kBSiuqBNYm9cDJeSB
 cmiETsbsJaGdl/G5Jg/KmGPql77oCW2z7kAKVtdyueCiapuVhhKkmc6zuUztnwQBCJjB
 NA1A==
X-Gm-Message-State: ANoB5plPsJJCpNGPLnLI5/Wv4aRh+PwezINmLdwus1skzLBeTE0752Iz
 tz4MBjcf7Be4qUb323ZGJAVltlo8O6Ufj58l9zw=
X-Google-Smtp-Source: AA0mqf7GaCFM2ubVQN3vwFN4u4fC/6+H1LS3OEdMc7DzvsTMUvit4E30T4Imb75OkCfh3I0OlcyfiOqSNuqWZkrc9TI=
X-Received: by 2002:ac2:4bc8:0:b0:4b3:9fcb:df92 with SMTP id
 o8-20020ac24bc8000000b004b39fcbdf92mr16402908lfq.607.1669644136890; Mon, 28
 Nov 2022 06:02:16 -0800 (PST)
MIME-Version: 1.0
References: <CAC9=Ai=o8hjR_7U3aPWc2mdUUGrvzL8hSqTBe-bGBr6Lb-DyzA@HIDDEN>
 <57b46e7e-e1fd-774b-f39c-e55e9782398b@HIDDEN>
In-Reply-To: <57b46e7e-e1fd-774b-f39c-e55e9782398b@HIDDEN>
From: Yuwei Tian <fishtai0@HIDDEN>
Date: Mon, 28 Nov 2022 22:01:57 +0800
Message-ID: <CAC9=AimeEzxTQG2ijsY105zdihGCvqD=8xxzBAnxZTLVn47j+A@HIDDEN>
Subject: Re: bug#59547: 28.2; The bottom border is not displayed when setting
 the pixel height of a child frame smaller than 1 line
To: martin rudalics <rudalics@HIDDEN>, 59547 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 59547
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

The problem reproduction code I gave is indeed problematic, and it is
indeed wrong to adjust 'window-safe-min-height' to 0.

The use case is to create a child frame with a height smaller than the
default line height, because the character size in the child frame is
set smaller than the default. How can this be achieved? Thanks.

On Mon, Nov 28, 2022 at 6:27 PM martin rudalics <rudalics@HIDDEN> wrote:
>
>  > Start Emacs from 'Emacs -Q' and make a child frame with the following
>  > code:
>  >
>  > (let ((window-min-height 1)
>  >        (window-min-width 1))
>
> The last line is problematic since 'window-safe-min-width' being 2
> will override it.
>
>  >    (fit-frame-to-buffer my-child-frame)
>  >    (let ((window-min-height 0)
>  > (window-safe-min-height 0))
>  >      (set-frame-size my-child-frame
>  >      (frame-pixel-width my-child-frame)
>  >      (floor (* 0.5 (frame-pixel-height my-child-frame)))
>  >      t)))
>
> This is overly complicated.
>
>    (let ((window-min-height 0)
>         (window-safe-min-height 0))
>      (set-frame-size my-child-frame 50 8 t)))
>
> suffices to show the problem here.  In either case, you do two things
> which most people would classify as pilot errors.
>
> - You bind 'window-safe-min-height' which is defined as a constant
>    variable and according to the doc-string of 'defconst' "neither
>    programs nor users should ever change the value".
>
> - You temporarily bind 'window-min-height' around the 'set-frame-size'
>    call which means that it may not affect future resize operations on
>    'my-child-frame' or its windows.  In particular, it may not affect the
>    frame size adjustment triggered by 'set-frame-size' itself if that
>    happens asynchronously (not within the scope of 'set-frame-size').
>
>  > The bottom border of the child frame is not displayed. Try to resize the
>  > child frame again:
>  >
>  > (let ((window-min-height 0)
>  >        (window-safe-min-height 0))
>  >    (set-frame-size my-child-frame 50 8 t))
>  >
>  > And select other window, then the bottom border of the child frame appears.
>
> Here clicking into the child frame with the mouse suffices to make the
> bottom border appear.
>
>  > This behavior seems to be platform dependent, but it is indeed
>  > problematic. It also seems to have problems on Emacs 28, Linux/X11.
>
> The immediate cause of the problem are these two lines in window.c's
> resize_frame_windows code:
>
>    new_pixel_size = max (horflag ? size : size - mini_height, unit);
>    new_size = new_pixel_size / unit;
>
> where unit is defined as
>
>    int unit = horflag ? FRAME_COLUMN_WIDTH (f) : FRAME_LINE_HEIGHT (f);
>
> As a consequence, 'compute_line_metrics' in xdisp.c will calculate
>
>        max_y = WINDOW_BOX_HEIGHT_NO_MODE_LINE (it->w);
>
>        if (row->y + row->height > max_y)
>         row->visible_height -= row->y + row->height - max_y;
>
> from the value of 'unit' above, the text is not clipped and whether you
> see the lower border or the lower part of the buffer text reduces to the
> question of who succeeds in drawing later into that area - the code
> displaying the buffer text or the one filling the border rectangle.
>
> If you replace these two lines with say
>
>    new_pixel_size = max (horflag ? size : size - mini_height, 1);
>    new_size = max (new_pixel_size / unit, unit);
>
> you should get the bottom border immediately.  Whether applying such a
> "fix" is safe, is a question I cannot answer though.  Here I'm living
> happily with fixes for this and many related problems but have no hope
> that they will ever see the light of master.
>
> martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59547; Package emacs. Full text available.

Message received at 59547 <at> debbugs.gnu.org:


Received: (at 59547) by debbugs.gnu.org; 28 Nov 2022 13:02:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 28 08:02:30 2022
Received: from localhost ([127.0.0.1]:48495 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozdmI-00048z-Ji
	for submit <at> debbugs.gnu.org; Mon, 28 Nov 2022 08:02:30 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47964)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ozdmG-00048s-TF
 for 59547 <at> debbugs.gnu.org; Mon, 28 Nov 2022 08:02:29 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ozdmB-0008Ae-7q; Mon, 28 Nov 2022 08:02:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=bXzNxb9Eija8tmM+jPrB4LRKeL0uHUbte6+Dan+Dknc=; b=LOu9QBjvkrLp
 /o7PGLkXEWBtjTM9aUpdl6y4KDpiJAPI1QvoETtGoNJt5hagblEsclll3fAAQ1ZcrwkGvj/3pXuoC
 03elt92pV2uM0gw7DJLeRTx28jRSyb8Rw848PedPhi5CAuYnYj7/DBml5w+Nl7MEay5w/hnwCehJv
 +2QJeRqSwP4p3964mHdyzuO95WKf8Q5yXR0bzBB7vVUJlLsovugcixEqqccbpqpApsOxk86AREorH
 BZYpwCir28dLU0BgaQ/i5/PDWOQCrblQ/J/fgQTZRibwLFizb7Vyeu/XSOXa7uuMJOryi1zRzk9X9
 sGbZ72tSWVJWmdmEZEBAZQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ozdm9-0000rg-Qe; Mon, 28 Nov 2022 08:02:23 -0500
Date: Mon, 28 Nov 2022 15:02:52 +0200
Message-Id: <83pmd7nseb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <57b46e7e-e1fd-774b-f39c-e55e9782398b@HIDDEN> (message from
 martin rudalics on Mon, 28 Nov 2022 11:27:17 +0100)
Subject: Re: bug#59547: 28.2;
 The bottom border is not displayed when setting the pixel height of a
 child frame smaller than 1 line
References: <CAC9=Ai=o8hjR_7U3aPWc2mdUUGrvzL8hSqTBe-bGBr6Lb-DyzA@HIDDEN>
 <57b46e7e-e1fd-774b-f39c-e55e9782398b@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59547
Cc: 59547 <at> debbugs.gnu.org, fishtai0@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 28 Nov 2022 11:27:17 +0100
> From: martin rudalics <rudalics@HIDDEN>
> 
> If you replace these two lines with say
> 
>    new_pixel_size = max (horflag ? size : size - mini_height, 1);
>    new_size = max (new_pixel_size / unit, unit);
> 
> you should get the bottom border immediately.  Whether applying such a
> "fix" is safe, is a question I cannot answer though.  Here I'm living
> happily with fixes for this and many related problems but have no hope
> that they will ever see the light of master.

To tell the truth, I hesitate to make changes just to cater to such a
problematic use case.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59547; Package emacs. Full text available.

Message received at 59547 <at> debbugs.gnu.org:


Received: (at 59547) by debbugs.gnu.org; 28 Nov 2022 10:27:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 28 05:27:29 2022
Received: from localhost ([127.0.0.1]:47734 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozbMG-0000FE-PW
	for submit <at> debbugs.gnu.org; Mon, 28 Nov 2022 05:27:29 -0500
Received: from mout.gmx.net ([212.227.15.19]:48445)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1ozbME-0000Es-LQ
 for 59547 <at> debbugs.gnu.org; Mon, 28 Nov 2022 05:27:27 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417;
 t=1669631239; bh=xkfoN/4HvGfciB2+JVl6TD97qSeDLE/MEZwo84M2k9Y=;
 h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To;
 b=JA/8ro2oYnwrJ2vdOnCkxB5tApeLCNNoR+ClVK46++oBziDRMMPuhsXaqTwnBPie6
 jdSOnUVH8+65w7xp+Up4sRYgzGV2L1kkwvHbmIi97ItdnkqEWQhF8XL0UY6qo27+YD
 4D/FJpAej4WLLnCPl4G3lYUFVCCrEoUxOv+RB6KD42vvfaI+HxabyNfjqmvUQLgOcD
 asEIVaq7dWjEky/D7gqOPcIpvbWDRj5jnYZz+UzQj4XJwabaUz29q8tG3wFK3y5STv
 RD9OVAsNTfM47Dem0TSSXYjRMR++EEUU8vnCsE0t7NF4SbocpZMGx9qc1pUwHDvPP1
 EPeV6L5HZ2PZg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.1.100] ([213.142.97.105]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MZTqW-1pTy5Z2YCM-00WWEN; Mon, 28
 Nov 2022 11:27:19 +0100
Message-ID: <57b46e7e-e1fd-774b-f39c-e55e9782398b@HIDDEN>
Date: Mon, 28 Nov 2022 11:27:17 +0100
MIME-Version: 1.0
Subject: Re: bug#59547: 28.2; The bottom border is not displayed when setting
 the pixel height of a child frame smaller than 1 line
Content-Language: en-US
To: Yuwei Tian <fishtai0@HIDDEN>, 59547 <at> debbugs.gnu.org
References: <CAC9=Ai=o8hjR_7U3aPWc2mdUUGrvzL8hSqTBe-bGBr6Lb-DyzA@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAC9=Ai=o8hjR_7U3aPWc2mdUUGrvzL8hSqTBe-bGBr6Lb-DyzA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:FPd6A63NISI16XScyEfrhh6wspjVU1UlCktvp/o9HmU3WHSx3Vw
 o5VF08/txQlNpjy+Tuj224cqTIHIoBcAhsixGlO9MVUgtcSq5gqwIl3hNZwrr/NNdjIDyFl
 znvv5YsVm2OR8uxh2MdvKRM74SaiY3vpCQj7mytRZahvwMyUEMDgS8rGeAnV4r58gaS0yJ1
 jSGsjTRQ1w9v9JRYxiCVQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:8PWE15CQo8A=;DRkrePrY7BzaqBCoktHdM4uc4FV
 TEiyelC0SstH9FOLWL0oLEF5Il0q43djt1/izOguu7lBz9/1XlKZyahN1mu2CAKn3eQD5vMWR
 16tA71WUeNWm62PjPS2/0URMq4z+b4iwiDWDs5ve+rarbTPLgbYSlqQBXb2AR6CrtS0DKJYZ/
 NWib8pE+PmsFw2E98lMVWsGwb2/RlybXb5repOMgJzZWK1IWGfh6km1slnr64B2IWijuzpRoG
 NrLYa9nQ+55eq6arqTfVhSJ7o2VZ1U4DWCVo/YwBBrv94VI5yADKHtnChObn9GFfzIo68ouNP
 TLNjb3ordKm542Zr/HUqhKXugKOtPQyAcQYs7ezo5L4sZK2wJ2QNZ9ysDbo+a5jrP6L82biUe
 vKMHAE4CpLFQVMYnBJLBMUzsURXy7m0LaiLE9oSNsGWAKYfq9gvNsWkJI5yVwO/gN0cmp0T2i
 mn5WiJW/ELkEUQqUWEXdcXOgEaZUT73fFcxdf2gKb2epKI438zcJho+4iJHMPR1Fhmx6Z4v4p
 Xm+dS2qXHlCNXAzjmmtWVzMC7bXfFouNtODlkmlbX7wsXPJEdchJmH/LkLBpO65C9nYJOeNqw
 u6e63NabtuUgy7TxGQbY9pn/yNo9dFU0Mtto69n6se5KUOpTd6maNqRzr0pFfXuqYmDnTQKim
 jHrp9AuXqyDW6mQCUoLgJwIAvvX0H2Lk7tUtQ6BvbRuAN8u5tUOXgcjjtG2dHcO0IdlwhQghi
 Y+w0QwU2LexEb++pQTnSwTsxHakcJUGui8seOd8Zu/db5FgeM6qrhbaFEnorEk/lNh0wGkVd4
 /A1g4+Ca+vya/qOXqRJt+f43gIRhlQurIyf9lOXFTBwDgIpvdJrL9Jzwy4KVfcyfwCcmh65BJ
 uGC3kOe0wERoVZTkCt1A9VPZ/utbhuJIZUYHXmULqUMaJy1xMAqsGfpWO1WxDHWdAa9YdSv8m
 wR3CmQ==
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > Start Emacs from 'Emacs -Q' and make a child frame with
 the following > code: > > (let ((window-min-height 1) > (window-min-width
 1)) The last line is problematic since 'window-safe-min-width' being 2 will
 override it. 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [213.142.97.105 listed in zen.spamhaus.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.15.19 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 59547
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > Start Emacs from 'Emacs -Q' and make a child frame with
    the following > code: > > (let ((window-min-height 1) > (window-min-width
    1)) The last line is problematic since 'window-safe-min-width' being 2 will
    override it. 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.15.19 listed in list.dnswl.org]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [213.142.97.105 listed in zen.spamhaus.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > Start Emacs from 'Emacs -Q' and make a child frame with the following
 > code:
 >
 > (let ((window-min-height 1)
 >        (window-min-width 1))

The last line is problematic since 'window-safe-min-width' being 2
will override it.

 >    (fit-frame-to-buffer my-child-frame)
 >    (let ((window-min-height 0)
 > (window-safe-min-height 0))
 >      (set-frame-size my-child-frame
 >      (frame-pixel-width my-child-frame)
 >      (floor (* 0.5 (frame-pixel-height my-child-frame)))
 >      t)))

This is overly complicated.

   (let ((window-min-height 0)
	(window-safe-min-height 0))
     (set-frame-size my-child-frame 50 8 t)))

suffices to show the problem here.  In either case, you do two things
which most people would classify as pilot errors.

- You bind 'window-safe-min-height' which is defined as a constant
   variable and according to the doc-string of 'defconst' "neither
   programs nor users should ever change the value".

- You temporarily bind 'window-min-height' around the 'set-frame-size'
   call which means that it may not affect future resize operations on
   'my-child-frame' or its windows.  In particular, it may not affect the
   frame size adjustment triggered by 'set-frame-size' itself if that
   happens asynchronously (not within the scope of 'set-frame-size').

 > The bottom border of the child frame is not displayed. Try to resize the
 > child frame again:
 >
 > (let ((window-min-height 0)
 >        (window-safe-min-height 0))
 >    (set-frame-size my-child-frame 50 8 t))
 >
 > And select other window, then the bottom border of the child frame appears.

Here clicking into the child frame with the mouse suffices to make the
bottom border appear.

 > This behavior seems to be platform dependent, but it is indeed
 > problematic. It also seems to have problems on Emacs 28, Linux/X11.

The immediate cause of the problem are these two lines in window.c's
resize_frame_windows code:

   new_pixel_size = max (horflag ? size : size - mini_height, unit);
   new_size = new_pixel_size / unit;

where unit is defined as

   int unit = horflag ? FRAME_COLUMN_WIDTH (f) : FRAME_LINE_HEIGHT (f);

As a consequence, 'compute_line_metrics' in xdisp.c will calculate

       max_y = WINDOW_BOX_HEIGHT_NO_MODE_LINE (it->w);

       if (row->y + row->height > max_y)
	row->visible_height -= row->y + row->height - max_y;

from the value of 'unit' above, the text is not clipped and whether you
see the lower border or the lower part of the buffer text reduces to the
question of who succeeds in drawing later into that area - the code
displaying the buffer text or the one filling the border rectangle.

If you replace these two lines with say

   new_pixel_size = max (horflag ? size : size - mini_height, 1);
   new_size = max (new_pixel_size / unit, unit);

you should get the bottom border immediately.  Whether applying such a
"fix" is safe, is a question I cannot answer though.  Here I'm living
happily with fixes for this and many related problems but have no hope
that they will ever see the light of master.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59547; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Nov 2022 16:32:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 11:32:00 2022
Received: from localhost ([127.0.0.1]:59880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oyF8p-0001hp-Ha
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 11:32:00 -0500
Received: from lists.gnu.org ([209.51.188.17]:55090)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fishtai0@HIDDEN>) id 1oyF8n-0001hh-R2
 for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 11:31:58 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <fishtai0@HIDDEN>)
 id 1oyF8n-0003qB-M9
 for bug-gnu-emacs@HIDDEN; Thu, 24 Nov 2022 11:31:57 -0500
Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <fishtai0@HIDDEN>)
 id 1oyF8l-0004Y4-M2
 for bug-gnu-emacs@HIDDEN; Thu, 24 Nov 2022 11:31:57 -0500
Received: by mail-lf1-x136.google.com with SMTP id j16so3216303lfe.12
 for <bug-gnu-emacs@HIDDEN>; Thu, 24 Nov 2022 08:31:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=O/2BIIoFtoYhyHCufIshhYWpVhZCv2D/0U3A8cgxQhc=;
 b=FDvzmKpmF05FSeCzo6K2N+2TQ/dIs7cnKXY3AHtMXph5HwNvvhQlSQeKGxEBkV5mbG
 zJ5QbaDiKNOklvhK/bJcjh6l75Q90Kvde7zZ72UfKHPDdk44OQHr4C2A9Bhfo0vL1bAi
 V6/Kyk4njXOxRmVpJDIzun/JCslL/EVyLyfr1+C8RINJ8guJ72CZhRN0H5qHxxV78LYa
 0dBXxmiu3TZ3xVWnGULh+QaadJdW4LMocmHHx8SNS69cmZr8TThRDyuoXLEe3BUBEsUz
 UTNJYGu2qKVUQOxwFn7DIuGq7IvmLUNTwrSvgqpLLizMorLBanLcoCdBDsGAKyQRp/xL
 MU+Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=O/2BIIoFtoYhyHCufIshhYWpVhZCv2D/0U3A8cgxQhc=;
 b=LutWUEDvU9kNhQm4xagJ7iFKXLKYm7hkVv0o8zTKKbk3pRhOHioofX04tqGruE+Mrp
 IjG0oRtN2JQTY9EbuB53AfqRrCnrx4BKMM0rW89JEgfAyUY6PL5VUdYPLhBACJiIuqMt
 Z7V/xTgrxJJa9wJ1JQYdbbrzLEBLoiqoe6JRQByFG+Iu73CPpl46fysjD5VFO9zAJJgu
 +pQuGTlg6dPVj9hAB5exNm7cMgdtXcCU3Iv6GWe2RwGmIaB6Z+5YdVKePCNxEUevf1af
 qvHOfE5DSUmKeYn8qmm99HPuoxi3p0VR5cZg4YCaOMSkOtadyV41IGZZ96fP91ddBSbT
 OXHQ==
X-Gm-Message-State: ANoB5pkvTbhDmz7xmLxYMqUFcc2O3p3RqBcMl20Xy3zVFfFZvqaEQLf4
 YAbSlKAIs8cii/NiI8sUuz/uNyt5rCul+XnHIZczXwexV8I=
X-Google-Smtp-Source: AA0mqf4gdABxhotwIsFvlE3Ct9QzX69vzdkKSRgl2XFm0QTl0TXGoCcH+V3bq32tqg8Gg0cL1Ric0LZ9trM8QP+WgVk=
X-Received: by 2002:a05:6512:3b12:b0:4b4:686b:4f7 with SMTP id
 f18-20020a0565123b1200b004b4686b04f7mr4839435lfv.256.1669307511034; Thu, 24
 Nov 2022 08:31:51 -0800 (PST)
MIME-Version: 1.0
From: Yuwei Tian <fishtai0@HIDDEN>
Date: Fri, 25 Nov 2022 00:31:39 +0800
Message-ID: <CAC9=Ai=o8hjR_7U3aPWc2mdUUGrvzL8hSqTBe-bGBr6Lb-DyzA@HIDDEN>
Subject: 28.2; The bottom border is not displayed when setting the pixel
 height of a child frame smaller than 1 line
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::136;
 envelope-from=fishtai0@HIDDEN; helo=mail-lf1-x136.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

Start Emacs from 'Emacs -Q' and make a child frame with the following
code:

(let ((window-min-height 1)
      (window-min-width 1))
  (setq my-child-frame
        (let ((after-make-frame-functions nil))
          (make-frame
           `((parent-frame . ,(window-frame))
             (no-accept-focus . t)
             (min-width  . t)
             (min-height . t)
             (border-width . 0)
             (internal-border-width . 0)
             (child-frame-border-width . 1)
             (vertical-scroll-bars . nil)
             (horizontal-scroll-bars . nil)
             (left-fringe . 10)
             (right-fringe . 0)
             (menu-bar-lines . 0)
             (tool-bar-lines . 0)
             (line-spacing . 0)
             (unsplittable . t)
             (no-other-frame . t)
             (undecorated . t)
             (visibility . t)
             (cursor-type . nil)
             (minibuffer . nil)
             (width . 50)
             (height . 1)
             (no-special-glyphs . t)))))

  (let ((window (frame-root-window my-child-frame)))
    (set-window-parameter window 'mode-line-format 'none)
    (set-window-parameter window 'header-line-format 'none))

  (set-face-background 'child-frame-border "red" my-child-frame)

  (set-window-buffer
   (frame-root-window my-child-frame) (get-buffer-create "*foo*"))

  (with-current-buffer "*foo*"
    (erase-buffer)
    (insert "line 1\n"))

  (fit-frame-to-buffer my-child-frame)
  (let ((window-min-height 0)
(window-safe-min-height 0))
    (set-frame-size my-child-frame
    (frame-pixel-width my-child-frame)
    (floor (* 0.5 (frame-pixel-height my-child-frame)))
    t)))

The bottom border of the child frame is not displayed. Try to resize the
child frame again:

(let ((window-min-height 0)
      (window-safe-min-height 0))
  (set-frame-size my-child-frame 50 8 t))

And select other window, then the bottom border of the child frame appears.

This behavior seems to be platform dependent, but it is indeed
problematic. It also seems to have problems on Emacs 28, Linux/X11.


In GNU Emacs 28.2 (build 1, x86_64-apple-darwin22.1.0, NS
appkit-2299.00 Version 13.0.1 (Build 22A400))
of 2022-11-18 built on fishtai0-macmini.local
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.0.1

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs-plus@28/28.2/share/info/emacs
--prefix=/usr/local/Cellar/emacs-plus@28/28.2 --with-xml2 --with-gnutls
--without-dbus --without-imagemagick --with-modules --with-rsvg
--with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
-march=nehalem -mmacosx-version-min=13
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
'CPPFLAGS=-I/usr/local/opt/icu4c/include
-I/usr/local/opt/openssl@HIDDEN/include -I/usr/local/opt/readline/include
-F/usr/local/Frameworks
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
'LDFLAGS=-L/usr/local/opt/icu4c/lib -L/usr/local/opt/openssl@HIDDEN/lib
-L/usr/local/opt/readline/lib -L/usr/local/lib -F/usr/local/Frameworks
-Wl,-headerpad_max_install_names
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk''

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process emacs)

Memory information:
((conses 16 53479 11176)
(symbols 48 6556 1)
(strings 32 18558 2150)
(string-bytes 1 622619)
(vectors 16 13162)
(vector-slots 8 191879 9585)
(floats 8 25 191)
(intervals 56 508 34)
(buffers 992 14))




Acknowledgement sent to Yuwei Tian <fishtai0@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#59547; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 29 Nov 2022 12:30:02 UTC

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