From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: ***SPAM*** Re: (x-display-pixel-height) Date: Sat, 21 May 2022 16:24:03 +0800 Message-ID: <87o7zrthss.fsf@yahoo.com> References: <9A8CEE6D-D021-4B40-8130-C89F51A98F51@easesoftware.com> <87leuyl4ax.fsf@yahoo.com> <7B1F4496-3539-4C6D-8470-C08A18022F10@easesoftware.com> <87sfp5ypxl.fsf@yahoo.com> <87ilpzvfdw.fsf@yahoo.com> <87wneftvwp.fsf@yahoo.com> <837d6f9v3z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26874"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 21 10:26:33 2022 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 1nsKRU-0006se-GR for ged-emacs-devel@m.gmane-mx.org; Sat, 21 May 2022 10:26:32 +0200 Original-Received: from localhost ([::1]:44376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsKRT-0003pe-1U for ged-emacs-devel@m.gmane-mx.org; Sat, 21 May 2022 04:26:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsKPK-0002na-CV for emacs-devel@gnu.org; Sat, 21 May 2022 04:24:18 -0400 Original-Received: from sonic303-20.consmr.mail.ne1.yahoo.com ([66.163.188.146]:38839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsKPI-0002Ku-IC for emacs-devel@gnu.org; Sat, 21 May 2022 04:24:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653121453; bh=HAowu0wT1QZ1yKSutL8crZA+g7+qxtWqhc1NatqM7Nc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=ZAE+B5+ClLVKm3sWI0RIQfuiJhNGYZlcndXndy1PJWY2IXixmTJEBM4oQHlx3JrUhihL8QVmhlGDqpclJpc0GNfMwgjK8cSlNFZqloPOmQA5NUsQr9iNX/YxAPwjjzWmDfy/MiZcvmyVSVA+TERax9i3q4y0P2vX58HX1stxUUhDzKuGqnt906Qot3sldGZH6zs9U7W9lJcUgG9TjvjYp7SS5yR44mp8ijH775HRwiHHfnIO2IhyE5HSt07SsXI+L31AplV05DBUnJspcUQvDGiAHWDzxIomFevZzW4sQDgvhRpJDkrLQyQbm2HumC7vvdIlwsFd02PygS5jSoFjiQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653121453; bh=3UHMnWETxB2NNV6PgxO6BpuP11ci33Z/e6rk+/eUPDH=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=km+vAABD1YlrpIBE/0jxD4UAJnHIhsJ99Pj7uaBPldcylx25cC/7Z3Vo3oD92iVe1J7CWXvxsOXrpMLD7JifOINlacL2kgFuJdPxStdgO82bARwRIVo/xYGLu+u6Ca2plY4KXqlGpAW8TqBJfHLQPS3PFlsXDvmNLVqieMuMPm/9vgdbz1LdFHvVzy7/UMhCN88kuIC0/1UFusLO5nZNjP+6gg4RXjoPxnW5wH2lYdo+8Y/nELCTnD8nWsE2v0WSR0d5mZaPU8McNPGji8zNozKxNDovbY1xJKPeSHUfuDAAlWqfS/U9J3yoQij2nM55c1m1QDAIMPyN+pA6w4Hh+Q== X-YMail-OSG: HsXGrk0VM1l.kC9DsH.y8x.iq9sbBcYhqK4Iu7UL6Tv.RvVhEKNcvXA3eDkM0sS kbQaX04sx92wavEUFbfNNQ2sRGNV37XC2tkVlzgEK._x_FDSDPjsu_eDadIT9XL4.MleLs0ERCuD 662C4mkWkg.NAy7EVTJYZXj56GvlvgZf257iOEVNtrAdU.Zrr8zehbEXgUxe9T1Fdea4akQYCU.h DbOYCjEiqMBi_mdMUgLzVU.CjjEBrq2clETMZIz5DyNHnTF8nu9jI7VVbBOXIM1sh4qzExH_GC9i SNxrBq_ZGcFH5PlHlBWy1XY9tRh4ut74I7uAZNZOHfm8lIZjH214gm9tmhyOX4nkKNRmnazIREKO YEf.KvAo0QnwZ3frQ6AGy9CcMmciClJWGruxN4u_oU2HNTdtXGU59gk_s_G4mfBUfQSOhqg1bGFj IMiPm7ocFqM3FPBcj3B2gH1BM2HMhrX2EbRu8tCAUAP_mA1vDq47W1MUDqt2O9vqGi8LoP.uPfqV cWT7eWKI1ZM64kIk0.HS0AXYZU06Oj50CvKQyqRbBHqjiXLuYRnDUbv4tkRQen65iCPx_6QaatBL PWdRoaoX709y54R3Vwo3gO3W_zfc7o4pVthvs0CxwEEoN3iilszuzuZ7SKYUzkEylf8MIhNU0EJD _lCCYjU2JQa4miA7LS3ezK_vZaqVOpFs3Zk6Myy5SuVXizUz5c9z9cST5SPRNqJXpK.C62nB_tl6 v8ekINyqn3WW22IUYyObZCQ5DEQT78Lg1uGzBj2sLbHx4Ec1ddXEZ8dPm1Kkc3u5nGQwYF5uTGKX OMYSm0AzPmd8NfnmxI631F_dB5ATV3xE4MXPnmEk_a X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Sat, 21 May 2022 08:24:13 +0000 Original-Received: by hermes--canary-production-sg3-7959d4d9bd-lwwxg (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 497f040ff85fde01ea1bac5b9b830e09; Sat, 21 May 2022 08:24:08 +0000 (UTC) In-Reply-To: <837d6f9v3z.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 May 2022 10:56:48 +0300") X-Mailer: WebService/1.1.20225 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.146; envelope-from=luangruo@yahoo.com; helo=sonic303-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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" Xref: news.gmane.io gmane.emacs.devel:290037 Archived-At: [Removed Perry since his address bounces.] Eli Zaretskii writes: > Thanks. > > However, the documentation of this hook IMO falls short of being > useful to Lisp programs: > > +@defvar display-monitors-changed-functions > +This variable is an abnormal hook run when the monitor configuration > +changes, which can happen if a monitor is rotated, moved, added or > +removed from a multiple-monitor setup, if the primary monitor changes, > +or if the resolution of a monitor changes. It is called with a single > +argument consisting of the terminal on which the monitor configuration > +changed. > +@end defvar > > This doesn't give any hints for how should a Lisp program get the > information about the monitor-configuration changes that triggered the > hook call, given just the terminal name. Without knowing how to > access that information, this hook is not very useful. That information isn't available in sufficient detail inside the events that we get from the window system. The idea is that programs will call `display-monitor-attributes-list' to retrieve the new monitor configuration, which is always available after the hook is run. How about this? @cindex monitor change functions @defvar display-monitors-changed-functions This variable is an abnormal hook run when the monitor configuration changes, which can happen if a monitor is rotated, moved, added or removed from a multiple-monitor setup, if the primary monitor changes, or if the resolution of a monitor changes. It is called with a single argument consisting of the terminal on which the monitor configuration changed. Programs should call @code{display-monitor-attributes-list} with the terminal as the argument to retrieve the changed monitor configuration inside this hook. @end defvar > I also notice that this hook was implemented for all the supported GUI > backends except w32, which is unfortunate and undocumented. I plan to try implementing it there in the coming days.