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.devel Subject: Re: Question about minibuffer and child frames (Posframe) Date: Mon, 7 Oct 2024 15:44:29 +0200 Message-ID: References: <87jzek200d.fsf@163.com> <875xq41kgm.fsf@163.com> <7a7b571d-3ba9-4a53-af8c-48c1cb783927@gmx.at> 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="3185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Feng Shu , Emacs Devel To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 07 15:45:34 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sxo3K-0000fT-94 for ged-emacs-devel@m.gmane-mx.org; Mon, 07 Oct 2024 15:45:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxo2a-0007Sv-6H; Mon, 07 Oct 2024 09:44:48 -0400 Original-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 ) id 1sxo2R-0007Lg-Id for emacs-devel@gnu.org; Mon, 07 Oct 2024 09:44:41 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxo2P-0004vl-Hz for emacs-devel@gnu.org; Mon, 07 Oct 2024 09:44:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1728308670; x=1728913470; i=rudalics@gmx.at; bh=W2XKk1vAV2kcSQdH+1zOaXL/vCr+usXJ7MkH8/C/Bpk=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=NM7u5WxYnpaNeepGLBTkSB8BNGYgriexCluQITBtq96Srt5LuU8Gnayl4F8Qv1sq DxVRIbagBrmTT+Mirb3O8C28qNtslGjgs5Kj6HMSmbdMfJTWsBkdAdsT0raYGNZxr t+QWoVcHs8V4q6n8r3+BrOEWi4kZLhu6qScRzZmVtvefkokv19C7UdA8F2OowuN/x 3MCgNxZDIV/Rl1fGA1T5bpTSHpm188vcU5C2eVkF3qkyYw5969KrRS6+bZAm7t2NS l4aFoz7890sRNGE57rJEpiivKX25Hs+93DsAMfvUlmbw6496TZs6DYSy6uzYwHll1 o+VE8cXX8TPhm6wLOQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.97.143]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N4QsY-1txi0m0s0E-015SBd; Mon, 07 Oct 2024 15:44:30 +0200 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:s8QOt7m/zQw8G/3qY022DJoMjHqUpYtBJB8fyssVrtpJPIwvHUG Y0mNotM4CeL3DZdwRKYBYzai8hnsaGQ630Ev2jXU2lLkKOyXVlguQtAFKsj+B7twFoz2zYt nVgTvraYtodsqzFJRMKq9FXdFKgaZGZ96RPhnbk2s4UnKTYmxLU3YKmIvjy/0q9s+zR0eUU rW/T/5SAzvIPRRIhF39QQ== UI-OutboundReport: notjunk:1;M01:P0:6wnk+ih/PqU=;81uAbQR1fV0NmH0e+HQZwlR6s5N fVYNEyP40+3YKf7SMCCggOb3LSGsi/VbWmbaP1ocblgFpIGn1zDwbzpnYNuc2JIsJBBZRsqJL uRug9SrgRI3zbk1p74ycOa3CufYZxrATFb7YHbq9zAxppWbPMhqd0qeWsYDfP9rpuU7i7nXqB XLe4d4dtOXmEz0nRd3l7w+Av4B6HH/v71EOoN5FwpcMf/gFJr0TKa0rRYKYWl1+a9TaMzvrT7 orOtXyxtzv+YeCxxa9eOT3MMkuZjg7Xvi9OK4rpWHVlvadYsviTg3ec7qdeRH1tyJn/Im4qh4 GckeD017+3iWBCGo9OLZ2s1sAFvXJ8hseEcsXkHfmTLQG8S7M3UlxAHzPzGJMbsOdMDez9uWq J/jb0QkjvuG0uevwdO91+29On+ivRAvsCuy7J6VCJORI3mboVTvVceCWmICNwy/irm1FZJFH4 DFdgx2byNbYQrMJaSNJVTYglpStx4tgpVgQ62E/F3Hp3n3OP+/PujDMr4caBJ6wTc9418i+vB 6HTP/LIqR09l7R1/xv24bFtnQ4HKpE7HsRncJgAXJSc+OIDHy0BHE34TclAVjzOja3JxYu6AR ZYC6pEJrjos2mC4gz9cKQQOk4CbcVNSXIpgQE6izbVqA7dLNlld/7Iheg998HzoA/T4bfS/FE e7U7M48VICzX77gL/GtQjCiwQfISu/ztETG309Qb1Mo9M4GXnhVhsg3sFQs59l+9WcVf9Iziz Q4FaVBC1esie6vJuLR8AoHVfZ/w3Js4aYtLldjPAz85MUifU40nXKOsrwuMcytBkA5JpikWI Received-SPF: pass client-ip=212.227.17.20; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324397 Archived-At: >> So the parent pays? If so, please say that somewhere because it will >> affect the position of the child frame within the parent. On a GUI the >> position is the one specified by the user and the child frame pays for >> the border (is "affected"). > > I don't know what you mean by "parent pays". Whenever you show a border, it will obscure the part of the display that would be otherwise shown instead. So someone has to pay for that border in terms of screen estate that is lost to that border. For normal GUI frames it usually doesn't matter - borders are narrow and the loser is the desktop background. Maximized and full screen frames usually don't have a border, so there's no problem at all (IIRC maximized MS Windows frames did have a border but it was drawn outside the screen). So basically, these border spaces are payed for by the desktop and possible other applications when frames overlap. Some window managers even make an invisible border around a frame which can be felt when a user tries in vain to move a window to a position of (0, 0) on the screen. With Emacs the situation becomes more complicated because there are up to three border types: One drawn by the window manager and our own ones - the one specified by the border_width slot which is hardly ever seen and the one specified by the internal_border_width slot (the child_frame_border_width slot for child frames). Now when you show a child frame on top of a normal frame you have two ways to draw the internal borders: (1) Keep the bounding rectangle of the child frame as specified. In this case the child frame pays for the borders since it will have less space for showing its text. (2) Enlarge the bounding rectangle of the child frame. In this case the parent frame pays for the borders since it will have less space for showing its text. On TTY frames drawing borders that are one character wide and high inflicts the additional problem that in case (1) the size specified by the application (maybe via 'fit-frame-to-buffer') is not met by what the user sees. In case (2) the position specified by the application may not be met - the left edge of the child frame may overlap an interesting part of the parent frame. In addition, (2) may not be entirely easy to realize when the child frame is positioned at an edge of the parent frame. martin