GNU bug report logs - #30074
26.0; Add function(s) for current monitor info

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 10 Jan 2018 23:13:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 26.0

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 30074 <at> debbugs.gnu.org
Subject: bug#30074: 26.0; Add function(s) for current monitor info
Date: Sun, 14 Jul 2019 15:07:57 -0700 (PDT)
> > Please consider adding a function that returns the info describing the
> > monitor that dominates a frame (default: selected frame).  In
> > particular, the size of the monitor.  This can be useful, for example,
> > for positioning a frame when there are multiple monitors.
> >
> > I've been using this, but you might have a better implementation in
> > mind:
> >
> > (defun current-monitor (&optional frame)
> >   "Attributes of monitor that dominates FRAME (default: `selected-frame')."
> >   (catch 'current-monitor
> >     (dolist (atts  (display-monitor-attributes-list frame))
> >       (when (member (or frame  (selected-frame)) (cdr (assq 'frames atts)))
> >         (throw 'current-monitor atts)))
> >     nil))                              ; Should never happen (?)
> 
> I guess it's possible for a frame to be on several monitors?  (Half on
> one and half on another.)  What would this function return in that case?

I'm not in front of multiple monitors now.  Perhaps
I can check later, when I am.

In any case, all we have, AFAIK, is
`display-monitor-attributes-list'.  It decides what
it returns.  Attribute `frames' is described thus:

"frames -- List of frames dominated by the physical monitor"

For the same frame to be "dominated" by more than
one monitor I would wonder what good the word
"dominated" could possibly do here.  It suggests
that one of the monitors dominates a given frame.

Anyway, I'll try to remember to check, when I'm
in the presence of > 1 monitor, unless someone
beats me to it.




This bug report was last modified 5 years and 310 days ago.

Previous Next


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