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: "after" variable watchers Date: Mon, 24 May 2021 10:48:29 +0200 Message-ID: <263b9804-b1ce-5559-41a3-cdb930bb9223@gmx.at> References: <83lf8du09t.fsf@gnu.org> <3431d752-559a-7d33-e2fb-2d81dd6cc794@gmx.at> <5a8b6fc9-cca8-374c-39f8-3f3d0f83fbca@gmx.at> <83r1i1o6q1.fsf@gnu.org> 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="9088"; mail-complaints-to="usenet@ciao.gmane.io" Cc: npostavs@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 24 10:50:11 2021 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 1ll6Ho-0002DS-U6 for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 10:50:08 +0200 Original-Received: from localhost ([::1]:34838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll6Ho-0006rN-0n for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 04:50:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll6GN-0004kh-PY for emacs-devel@gnu.org; Mon, 24 May 2021 04:48:39 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:42247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll6GL-0007Jb-Ta; Mon, 24 May 2021 04:48:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621846111; bh=5MSeW/yFsgbdNq1VGeFF59JY3D/Mc+/eTYOq1rMU62k=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=gufAe5pKJrRD7G8ToHr+sLbwhVfyHrR17R0K/NZNLbhujWxyUEqGb1n2PRXUw4BsE bxv94uoxKVUeEkhHymyMQYGsvGaEaZr53itQIEuCSTUIAsj+UvosVnOFPOpklq+cqq WQkcwQVSXmFEHSG6d6gYdzd0SjhgLLuETquVYze0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.110]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MVvLB-1lucu21ZOH-00Rt7Y; Mon, 24 May 2021 10:48:31 +0200 In-Reply-To: <83r1i1o6q1.fsf@gnu.org> Content-Language: en-US X-Provags-ID: V03:K1:a2e84vfe56f9Nvy2AAWA83CsWQk1a51UekCQUfxPchiFt7GZvcP XqdoDQunyKWp5UbUCdSXWU0L4sTVARPhYdvnSDIcsmIvdufZ94+i/M2bhPFFtftImLB4PIl lyCdjmDq/y+Cfl8XqYGyx4Zjmm/+n7C1OP54TGNjFLKrmFd3EoMR13ZyUQLySAR06cX0l7N M0gH2x2OYICjcu2Yfz5Dg== X-UI-Out-Filterresults: notjunk:1;V03:K0:5aRrbMaFP5I=:fakg0bLpUwmHiIGbLi99Na TZWhrfeowIS8tn0c6NAAOAg10MhFu/+GrKRQ+UxJqhuO+YHg4nDZjEs1Z2/i10C5MoE8J1o3d EVpXBx3uvA7ptVpssCalWQ74xz/G3Pbhn07xjfjbJcF6por/+eDpNcl+lcZrgac9YRXkIrzvg eQpFN+l4mhy7ldQ0zvyxe7zOI8reozfzC/Rw/ytXKpnLtqUWXaHVoYaxQdixDlPvVqCo32Rhe EK4Xuzn9h4dDxp6cHRJdtHI/ZGRJwRw8xA+/ypc+Kqv9Og0MbtjLYMmAj9BxFR0SrMLdQ+er4 mYBJXj4a6DZtnEAxdTdXz804LwSrfAJlIzXQ/lSmYo5MqUwy/wVxiCTNWoRZ5rNJgO0Rf36pR 1WHS8ZZuvgDmcYNTpYO3R+U9JmaniEcyqv3heuqSiusay8L9HK658vxa+L6gxVg6mY0rFnibx /i1Xu3a0mGt6vmaJJCwh9V3cfK24uCaip3+OWrw84s0PRY1VOzMEmKlZJD132ZVnXFrMD3r/L e8IqORbvzmM8Dmi1PSj38UWrkVazRuR3oeOxb7gM58TK7IBM+AR1LRjk1PXd/OhZPSAAIucEs c/rslFc54659zeWN77e6F2+uMeQwJDNJ+mxuXS0U6tNJzRzBcywJMD38EAhNK1bxOvnL/oLgl a82c1m9MMm+6/H/zrc9F2Ll4EtYTrWGkadjMQwQLyQzQnXnKUaOJ86yNYN8mnrHjwoR2O8k/q hTgP7JYbM42hyxLnrJPKJgwrs1lU+wbTFCDdmonnh18BykQs70toMrhDyLKkzWzr2iOVIOiD Received-SPF: pass client-ip=212.227.17.22; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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.23 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" Xref: news.gmane.io gmane.emacs.devel:269741 Archived-At: >> There are too many implicit "realized" values to make this work nicely. >> Think of macros like WINDOW_BODY_PIXEL_WIDTH, WINDOW_BOX_LEFT_EDGE_X, >> WINDOW_BOX_RIGHT_EDGE_X, WINDOW_SCROLL_BAR_X or functions like >> window_box_height in addition to the things window_updeco_window sets >> directly. > > I don't think I understand this reasoning. Changes in these values > are only visible as result of the next redisplay cycle, no? So in > effect these values "wait" for the next redisplay anyway, right? window_box_height or its moral equivalents like `window-inside-edges' should be accessible before that, so a user or an application can make layout decisions immediately after it has set a decoration. Currently, it can do that when invoking `set-window-fringes' or setting the `left-fringe' parameter of the window's frame. It cannot do that when setting `left-fringe-width' of the window's buffer unless it also does a `set-window-buffer' right away. >> Right. But note that I implicitly call window_updeco_window also >> whenever I change a window's size, for example, from adjust_frame_size >> after a frame got resized. > > I think Stefan asks why do we need to do that. Why not wait for when > these values are needed by redisplay, and calculate them only then? If a specified value does not fit, we should be able react in different ways: - When an application asks for a window size that is not large enough to accommodate its decorations, we should be able to reject that request and signal an error. - When the WM shrinks our frame so that a particular window is not large enough to include all of its decorations, we have to comply and do something reasonable to make that window display its contents orderly. The display engine is not able to distinguish these cases. And even if it were, how should it react in the first case? martin