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: Ship Mints <shipmints <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>, Ship Mints <shipmints <at> gmail.com>, Ruiyang Wu <ywwry66 <at> gmail.com>,  Robert Pluim <rpluim <at> gmail.com>, Juri Linkov <juri <at> linkov.net>, 76691 <at> debbugs.gnu.org, Stefan Kangas <stefankangas <at> gmail.com>
Subject: bug#76691: `display-monitor-attributes-list` not working properly on macOS
Date: Wed, 28 May 2025 15:17:33 -0400
[Message part 1 (text/plain, inline)]
On Wed, May 28, 2025 at 2:15 PM Alan Third <alan <at> idiocy.org> wrote:

> On Mon, May 26, 2025 at 06:43:54PM -0400, Ship Mints wrote:
> > On Mon, May 26, 2025 at 5:17 PM Alan Third <alan <at> idiocy.org> wrote:
> >
> > > package emacs
> > > merge 76691 76051
> > > user emacs
> > > usertag 76691 + ns
> > > thankyou
> > >
> > > On Mon, Apr 07, 2025 at 01:10:49AM -0400, Ruiyang Wu wrote:
> > > > Hi all,
> > > >
> > > > How can we move this forward? It would be great to see Ship Mints'
> > > > patch merged to master and backported to emacs-30.
> > >
> > > Is there anything blocking this other than getting the OK from the
> > > maintainers? I'm inclined to say it's good to go as the existing names
> > > don't work at all, afaik, so we can't be any worse off than we were
> > > before.
> > >
> > > Stephane, when you get a chance can you forward the latest version of
> > > this patch so I can compare it with my patch for 76051 so we can see
> > > if they're covering the same ground? Thanks.
> > >
> >
> > See attached.  I didn't rebase this recently but I doubt nsfns.m has
> > changed much, if at all.
>
> It applied cleanly alongside my patch, so I think we're good. I'll do
> a test build in a bit and I think we can get both patches pushed up
> once someone with two screen checks mine.
>
> Do you want to finish off the commit message or should I give it a go?
>

Nice.  Not home where I have that branch locally, so writing this
manually...

*snip*
Fix ns_make_monitor_attribute_list (bug#76691)

This is the NS implementation for 'display-monitor-attributes-list'.
Change implementation from IORegistry to direct introspection
of NSScreen.

* src/nsfns.m (ns_make_monitor_attribute_list): Use localizedName
selector on NSScreen.  For anonymous displays, synthesize names
of the form ("%dx%d@%d,%d" width height x y).
(ns_get_name_from_ioreg) (ns_screen_name): Removed.
*snip*

Feel free to adapt, and thank you.

-Stephane
[Message part 2 (text/html, inline)]

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.