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: (x-display-pixel-height) Date: Thu, 19 May 2022 09:05:58 +0800 Message-ID: <87leuyl4ax.fsf@yahoo.com> References: <9A8CEE6D-D021-4B40-8130-C89F51A98F51@easesoftware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15966"; 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: Perry Smith Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 19 03:07:30 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 1nrUdW-0003wM-2e for ged-emacs-devel@m.gmane-mx.org; Thu, 19 May 2022 03:07:30 +0200 Original-Received: from localhost ([::1]:48268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrUdU-00043x-Ju for ged-emacs-devel@m.gmane-mx.org; Wed, 18 May 2022 21:07:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrUcK-0003Ga-Iw for emacs-devel@gnu.org; Wed, 18 May 2022 21:06:16 -0400 Original-Received: from sonic305-22.consmr.mail.ne1.yahoo.com ([66.163.185.148]:35692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrUcG-0004eK-PT for emacs-devel@gnu.org; Wed, 18 May 2022 21:06:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1652922370; bh=5E3aj2PnjhpUJva7xjUJ3OP2u6S8rkusOFS2lITgmXo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Po2UMklfdH5AnxW+B2MGysv6hu3nody2nSgMieflVYbEOE9T9suaVSVsaUUMxQTc4FkCKenFUFmRpt/VIypi0clyKPK/3PpLilOUCcGGnbWSrABzGCL8gHnZdY0saEvqfVJBS9xTJ9D1tojcKSoRcKGvbw1ajyNT2AekYtJpCkH17u5wH6UQ+eWclzYZwCY/FsJEqx+PCcywx1froIIXCcY/c8e7zFAdKBl8AO+zDjVuOWozNVS+KX3hLrbL9Fdp3Y5RHIQLYr0bhtLLI/abtV9yB2X9xo2hV+oPdrMNFI3trzABfeG/hNmAAmThvOk1hvNAjjU5xHaDYTkK9CdFhw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1652922370; bh=lzhKyzrJrihnYJwYJCnv3w1ra6adHv13OeTdT+j0bOR=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=J1Oin5r9HC7gklpU7AhuGbmscF5CQHlspfF99J5EjToZyN0iy0v0JbOsgMDrk+NU65z9KTSu9agD0R9CJPmAFe3Y2X/FCJR21sA1ny/cZAHMrihvE75aRM5wU1GcykN4ardwAYdpJuOF6ClzsNe8D2MzDVfOcPweQgg7yrIoGcShfmRiBA+mtY+76+2uB1/x43r6ULgEho0VzfhQww8qUXClAOLrrquwTCR0fh50SuA+67a/W4iKB/RceziHJRGkXCw4CJPP3PkgHQkpT7I9SS5RnbwIQ9EAhc8k6PKMvaBzh/jocBbtBa4Gi5lszBDkvbsyOC5/ipl89DcUDmc+Lg== X-YMail-OSG: unC0oqsVM1kBIA3k6Ib8AAphgknnsIcP2w7T.2RktLljGa8FGLb4Axmeup9WKHa tAC4Y5XxSsgez3Xy0DmVyi5KaVybZLntjNgAdM4z9zcprI1VUCeDE5sRq0Qc1IRZ3SXPWfvtoidH cXOiQDkNS4FuN62EuVb7kxjQO8gRhJzViJ1sNesJKO.aAye9GtLP619zGbgA_Ik26pYpSMKeoeIM VPz1fZbJKQNEI9jkavW.Kwy6l62gl2DACiQ0y5AWmjDgUzUkc.ck9lAYujKOXA_Kq0DD4FXiJ2P. xM016e19JpFbFzB4_SrHs.g7dYT8HF7cPNyNwmxTpsMXLLli1cBjE251gEg5GupTc4eJvF1aK1To _avkuzP5Vs04wm0N.V2O.O3nnrnjejeh0yk75LWOk.BC_aOxKJyW.rjO5O4N62DSGevuGD9qbf.9 88v9HVRkx.8hgutcJwUwUTnR.pBjlXmmVqliab8pNWnSK1C.FGwqwU8GkbkP3VmL48S_UoNoE231 Mr6r0ZUqBV8ggPXga1SDJcXt_XiBqm61vlM997LWbVmD8wPn035dR1X3VlhDZHcpxsTYSzSK5XJ9 DVvxDn6p4UtDpA3kjJ1v4gke8QCSxm7esB80yaoNYlq5u8RBHQx.er9VJS_Nvxer_kFIVp89BF0Z vZtspgHrPyLgQRkYEniVRMujQ8Vj0ayBG3Gwf_Tp__aHZd.zykRWIyvhVg9pvifkDVhgb4tJFeTI mlg2Lr1rG1QTqgZFw6ntWzzlKEPMPocVPDPZncVg0A.NntZDglqqBRYfSnnQkF3Lbx6uaqA_cZ9i AEsXQhUKMfQdwCmi2ZE4qntBLKBOQ08Hl84fdyQfcE X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Thu, 19 May 2022 01:06:10 +0000 Original-Received: by hermes--canary-production-sg3-78f9b9c87b-br5zq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 01708a7e9b8b86138ecb39bc1d2bc4e0; Thu, 19 May 2022 01:06:03 +0000 (UTC) In-Reply-To: <9A8CEE6D-D021-4B40-8130-C89F51A98F51@easesoftware.com> (Perry Smith's message of "Wed, 18 May 2022 17:56:33 -0500") 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.185.148; envelope-from=luangruo@yahoo.com; helo=sonic305-22.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:289946 Archived-At: Perry Smith writes: > However, the X11 version does not do this. I always get 2025. The > output from `(display-monitor-attributes-list)` changes. With the > monitor attached, there are two entries roughly like the one above and > when the monitor is not attached, the output is a single entry. > > The 2025 appears to be the value when the first window is opened > perhaps? It is the same value as the sum of the heights when the > monitor is attached. And it appears that it is not getting updated > when the monitor is detached. Is this a bug? If so, I can report it > but thought I would check here first. (I also can=E2=80=99t follow how > x_display_pixel_height works but that=E2=80=99s a detail.) Xlib determines the height of the core protocol screen statically upon connecting to an X server. It cannot change as monitors are hotplugged. In X, there are about 3 or 4 different ways to fetch screen and/or monitor dimensions. Each of them behave differently. `x-display-pixel-height' uses the core HeightOfScreen, while `display-monitor-attributes-list' defaults to using the RandR extension, which can change dynamically as the screen dimensions are updated. (That will be fixed in Emacs 29.) As for why you always get 2025 instead of 2062, I think your X server is only including the "workarea" of the macOS display in its screen dimensions. In general, every X server that doesn't run on actual hardware or a Wayland compositor reports screen dimensions and input devices incorrectly. That cannot be helped. > My question pertains to the name of the monitors. Can I somehow give > the monitors names that will last for the life of Emacs? No, unfortunately not.