GNU bug report logs - #76691
`display-monitor-attributes-list` not working properly on macOS

Previous Next

Package: emacs;

Reported by: Ruiyang Wu <ywwry66 <at> gmail.com>

Date: Sun, 2 Mar 2025 21:00:03 UTC

Severity: normal

Tags: confirmed, patch

Merged with 76051

Found in versions 29.4, 30.1, 31.0.50

Done: Alan Third <alan <at> idiocy.org>

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Ruiyang Wu <ywwry66 <at> gmail.com>, Stefan Kangas <stefankangas <at> gmail.com>, 76691 <at> debbugs.gnu.org
Subject: bug#76691: `display-monitor-attributes-list` not working properly on macOS
Date: Tue, 04 Mar 2025 14:18:26 +0100
>>>>> On Tue, 04 Mar 2025 09:10:19 +0200, Juri Linkov <juri <at> linkov.net> said:


    Juri> The command just uses the output of `display-monitor-attributes-list`.
    Juri> I don't know why `display-monitor-attributes-list` doesn't recognize
    Juri> monitors on macOS and doesn't return their 'name'.  I tried

    Juri> (mapcar (lambda (a)
    Juri>           (cdr (assq 'name a)))
    Juri>         (display-monitor-attributes-list))

    Juri> and on GNU/Linux it correctly returns

    Juri> ("HDMI-1" "eDP-1")

See also bug#34516, which has a patch from me to invent monitor names
on macOS.

That bug also points at code from <https://github.com/glfw/glfw>,
which someone motivated could perhaps copy.

<https://github.com/glfw/glfw/blob/master/LICENSE.md> is as follows:

    Copyright (c) 2002-2006 Marcus Geelnard

    Copyright (c) 2006-2019 Camilla Löwy

    This software is provided 'as-is', without any express or implied
    warranty. In no event will the authors be held liable for any damages
    arising from the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    The origin of this software must not be misrepresented; you must
    not claim that you wrote the original software. If you use this
    software in a product, an acknowledgment in the product
    documentation would be appreciated but is not required.

    Altered source versions must be plainly marked as such, and must
    not be misrepresented as being the original software.

    This notice may not be removed or altered from any source
    distribution.


Robert
-- 




This bug report was last modified 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.