Subject: bug#30074: 26.0; Add function(s) for current monitor info

From: Drew Adams <[email-masked]>
Date: Mon, 15 Jul 2019 08:21:00 -0700 (PDT)

> > There is already `frame-monitor-attributes' 
> >   (frame-monitor-attributes (selected-frame))
> 
> So there is.  Drew, does this function do what you want?

Yes, that takes care of the `current-monitor'
function, but not `current-monitor-size.
Please consider this bug report to be a
request for a function like that.

---

The doc string of `frame-monitor-attributes'
also answers Lars's question about dominating
monitor:

 A frame is dominated by a physical monitor when either the
 largest area of the frame resides in the monitor, or the monitor
 is the closest to the frame if the frame does not intersect any
 physical monitors.

That makes it clear that there is only one
dominating monitor for a given frame.  (It
does so only indirectly, though, by saying
"largest" and "the" "closest" monitor.)

And the doc string of `display-monitor-attributes-list'
repeats that same text and adds this, which
makes it explicit:

 Every (non-tooltip) frame (including invisible ones)
 in a graphical display is dominated by exactly one physical
 monitor at a time, though it can span multiple (or no) physical
 monitors.

And testing shows that that is the case.