From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "after" variable watchers Date: Thu, 20 May 2021 16:49:42 +0300 Message-ID: <83r1i1o6q1.fsf@gnu.org> References: <83lf8du09t.fsf@gnu.org> <3431d752-559a-7d33-e2fb-2d81dd6cc794@gmx.at> <5a8b6fc9-cca8-374c-39f8-3f3d0f83fbca@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6784"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, npostavs@gmail.com To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 20 15:51:31 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 1ljj5D-0001Rg-4V for ged-emacs-devel@m.gmane-mx.org; Thu, 20 May 2021 15:51:27 +0200 Original-Received: from localhost ([::1]:36876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljj5B-00075N-7s for ged-emacs-devel@m.gmane-mx.org; Thu, 20 May 2021 09:51:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljj3O-0003Dr-Eh for emacs-devel@gnu.org; Thu, 20 May 2021 09:49:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:32798) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljj3L-0001On-6R; Thu, 20 May 2021 09:49:34 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4879 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljj3K-0003af-Oy; Thu, 20 May 2021 09:49:31 -0400 In-Reply-To: (message from martin rudalics on Tue, 18 May 2021 19:01:34 +0200) 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:269498 Archived-At: > Cc: Eli Zaretskii , npostavs@gmail.com, emacs-devel@gnu.org > From: martin rudalics > Date: Tue, 18 May 2021 19:01:34 +0200 > > > What was the problem you encountered when you tried to add: > > > > if () window_updeco_window (...); > > > > to the getters of the realized values? > > 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? > 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?