From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#76051: 29.4; Incorrect workarea entry in display-monitor-attributes-list on macOS Date: Tue, 4 Feb 2025 14:42:07 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007ebe07062d512dd6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40373"; mail-complaints-to="usenet@ciao.gmane.io" To: 76051@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 04 14:43:15 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tfJCs-000ANW-V3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Feb 2025 14:43:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tfJCh-0005dw-4b; Tue, 04 Feb 2025 08:43:03 -0500 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 1tfJCg-0005d2-Fd for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2025 08:43:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tfJCg-0002B6-7T for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2025 08:43:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:MIME-Version:To:Subject; bh=Affufy7vWYBe3ekpmG2EMv4e68gSkuMuHaJsIzJ4Ul0=; b=Xer2qOlrrKVP7ul8F2eoR1LJDzephZtgaHkcaNP59bgo6EIgdhthoklGbgdia2xPW1YTmQZ/2uqLZ5b0/vzQDjOmaP4J72uEepeqjYBR1X4Zu3oc/c+8XfrW564kamP0HrwHJfbyi3FzkiUpxzsuX5m/qbOVYJmLUlV8tUCxWekfd8FR/ZZIpiqZHPyks9elzBWjlSsXIALUmC4OC0PNqfmpTCWIVGEY4uNIbcUZIlEHdat9jBYQpRaK2oaqCEwAXj13hdsGOGTUXY4DVY97LivVz8HlFVRhCZabSAI/ht9HefCNl8KMdSTwZRVndUKbq/Xq/+7nX5jCB5CbAlkdKw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tfJCg-0002uc-3X for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2025 08:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Feb 2025 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76051 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs bug reports and feature requests Original-Received: via spool by submit@debbugs.gnu.org id=B.173867655411131 (code B ref -1); Tue, 04 Feb 2025 13:43:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Feb 2025 13:42:34 +0000 Original-Received: from localhost ([127.0.0.1]:43184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tfJCE-0002tS-9I for submit@debbugs.gnu.org; Tue, 04 Feb 2025 08:42:34 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:60668) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tfJCA-0002tB-UH for submit@debbugs.gnu.org; Tue, 04 Feb 2025 08:42:32 -0500 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 1tfJC4-0005Ui-91 for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2025 08:42:24 -0500 Original-Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tfJC2-00028h-IZ for bug-gnu-emacs@gnu.org; Tue, 04 Feb 2025 08:42:23 -0500 Original-Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5d9837f201aso12330712a12.0 for ; Tue, 04 Feb 2025 05:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738676540; x=1739281340; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Affufy7vWYBe3ekpmG2EMv4e68gSkuMuHaJsIzJ4Ul0=; b=JxlKwtVol4Tjq4VVnKTV4kyuLvUmPPR1+WDqc9OMPGrjDVPrLzrDu0FdLkKgJVMG9g jeHuJLSxJ+dY7hFgEoSMBU5/EM5l0JmOlW5VuZdXSZ8uyuUiHCuJH9jqMK+3VkcbC9Ma 31GaloxlB1P+3AzZVKG3P6luHdwxKt9S2sz5uwtmYKRg1iTUXgCF6Ql6KGHh6B5XYO9R 1RGU81sOvYXwvS+gppV/M21yYYShRO7VnmqAEWjGfNjB9WLa3P5Na0cCT713lvXc9u73 VnrNfr5eZQlYTNmN9gGnHkFTpGAiWEJyPcRNC4IXWrBvZRTn5hWpfManIawNah6dr/7E l+ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738676540; x=1739281340; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Affufy7vWYBe3ekpmG2EMv4e68gSkuMuHaJsIzJ4Ul0=; b=IWaFypecU08fDRC223mI0epbG83qrJJrjp82YDTcTL7yRHgd8IY76ZA95OzGUkXBi2 HkdUkWhCvOQztyM57ta0hu2FD4fXkZ3FrKRUAbI9mkQ6Qs9GGjykpcfMjzp44A6N5+pb jg1+g2ifbu47JiR/X1gSo8SRiO5wICd8OSVoZQtJlJ2E0wgk3UJMEFjegzhmAhFqo7XE o3aOoqv9gDbyQj6k4HB4xRRtS+T9dagY1/5KUL9cK0EuvPhwrbNY+x8X4KiDPW+BEKh2 KmoJxdAJOpW36aIXAp9IcQFgDLSAZNHQY/ULcc4BILfggMQBDpDovfBOXHG6KzAS9Rwo KIUw== X-Gm-Message-State: AOJu0YzMeBa5O89fbBEcuK0C7mvHKBgiaUFoVO0JrWCd06Bf3fBIQGf6 hqvYQ8B99RQ6vuW3xeFPxPkdcz2y3kap4OqDjai9L9kegZKq8ndS60mS0YE2zQk9ei1KRKG6fhT XPRh2q1OwJtZ5OzLXPFy0xmzE2YTiKnKh X-Gm-Gg: ASbGncsBOOoUSb6HnO7dUOmXwVkTnWd5MHyjQDl2jcGBe1kg1LADiwM6B6JXdW86Bnr QU4FGJL562uVD3MoXDOPhwIvAwqrnOVds4iVpKu0BthHJlNxPRoeCqoXlW2MiXnnSUjYmcHdM6H zfOgWeCJs3XM4Oa8P/Iwwnx0on2IS7mMs= X-Google-Smtp-Source: AGHT+IFHJTRGcFQZhfBNYo/uct2yb6j6s8qy0cUnZ5UC9GgNcxtuUgvGFdQ1m/DYoVZUQBQfCzLoh+TFcGoM11r61t0= X-Received: by 2002:a05:6402:1cc1:b0:5d3:eb50:4e33 with SMTP id 4fb4d7f45d1cf-5dcc14a5279mr2891971a12.5.1738676539141; Tue, 04 Feb 2025 05:42:19 -0800 (PST) X-Gm-Features: AWEUYZnatKTzN1p1EWgr5Yz4SDWNA2NlQewZwsR-dgmOVOGmBbwcrgvloQmzVaA Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=andlind@gmail.com; helo=mail-ed1-x529.google.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:301010 Archived-At: --0000000000007ebe07062d512dd6 Content-Type: text/plain; charset="UTF-8" Hi! I think the `display-monitor-attributes-list' function returns an incorrect `workarea' entry on macOS. Concretely, I have a laptop with an external monitor connected. The external monitor is placed above to the left. The `display-monitor-attributes-list' function returns the following (abbreviated): (((geometry 0 0 1728 1117) (workarea 0 38 1728 1079) ... ((geometry -2560 -723 2560 1440) (workarea -2560 -638 2560 1330) ...)) The first member in the list describes the laptop monitor (the primary monitor), the second the external monitor. The first two numbers, `X' and `Y', in each entry describe the position of the top left corner of the area, relative to the top left corner of the primary monitor. The number that I think is incorrect is the `Y' of the workarea of the external monitor, which is "-638". It indicates that there is a (723-638 = 85 pixel area on top of the screen which is outside the work area.) However, in reality, there is a 25 pixel menu bar which should be outside the work area. The 85 probably comes from the macOS dock, which is placed in the lower part of the screen. The height field correctly includes both the menu bar and the dock. I've tested this on Emacs 29.4 and 30.0.93 on macOS 15.1. -- Anders Lindgren (Long time Emacs contributor and former NS maintainer) --0000000000007ebe07062d512dd6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

I think the `display-monitor-attributes-list= 9; function returns an incorrect `workarea' entry on macOS.

Conc= retely, I have a laptop with an external monitor connected. The external mo= nitor is placed above to the left.

The `display-monitor-attributes-l= ist' function returns the following (abbreviated):

=C2=A0 =C2=A0= (((geometry 0 0 1728 1117) (workarea 0 38 1728 1079) ...
=C2=A0 =C2=A0 = =C2=A0((geometry -2560 -723 2560 1440) (workarea -2560 -638 2560 1330) ...)= )

The first member in the list describes the laptop monitor (the pri= mary monitor), the second the external monitor.

The first two number= s, `X' and `Y', in each entry describe the position of the top left= corner of the area, relative to the top left corner of the primary monitor= .

The number that I think is incorrect is the `Y' of the workare= a of the external monitor, which is "-638". It indicates that the= re is a (723-638 =3D 85 pixel area on top of the screen which is outside th= e work area.)

However, in reality, there is a 25 pixel menu bar whic= h should be outside the work area. The 85 probably comes from the macOS doc= k, which is placed in the lower part of the screen.

The height field= correctly includes both the menu bar and the dock.

I've tested = this on Emacs 29.4 and 30.0.93 on macOS 15.1.

=C2=A0 =C2=A0 -- Ander= s Lindgren (Long time Emacs contributor and former NS maintainer)
--0000000000007ebe07062d512dd6--