[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30074: 26.0; Add function(s) for current monitor info
From: |
Drew Adams |
Subject: |
bug#30074: 26.0; Add function(s) for current monitor info |
Date: |
Mon, 15 Jul 2019 09:17:42 -0700 (PDT) |
> > 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.
>
> Well, there's
> (x-display-pixel-width (selected-frame))
> => 1920
> (and height), so it seems like we're covered...
No, we're not covered. `C-h f x-display-pixel-width':
On "multi-monitor" setups this refers to the pixel width for all
physical monitors associated with DISPLAY. To get information for
each physical monitor, use 'display-monitor-attributes-list'.
IOW, use `display-monitor-attributes-list'.
I think you're missing the point of this
request. Yes, all such info is available
from `display-monitor-attributes-list'.
The point is to have specific functions
that provide it directly.
> And the function above also returns the same size data, but as an alist:
>
> (frame-monitor-attributes (selected-frame))
> => ((name . "eDP1") (geometry 0 0 1920 1080) (workarea 0 27 1920 1053) (mm-
> size 310 170) (frames #<frame movie.el 0x563f20223a30> #<frame emacs
> 0x563f22915f10>) (source . "Gdk"))
`current-monitor-size' is a convenience function.
Obviously you can get the info it provides by
digging it out of `display-monitor-attributes-list'
(or `frame-monitor-attributes', which just calls
`d-m-a-l').
`current-monitor-size' gives you directly,
au choix, the geometry or workarea size.
- bug#30074: 26.0; Add function(s) for current monitor info, Lars Ingebrigtsen, 2019/07/14
- bug#30074: 26.0; Add function(s) for current monitor info, Juri Linkov, 2019/07/14
- bug#30074: 26.0; Add function(s) for current monitor info, Lars Ingebrigtsen, 2019/07/15
- bug#30074: 26.0; Add function(s) for current monitor info, Andy Moreton, 2019/07/15
- bug#30074: 26.0; Add function(s) for current monitor info, Drew Adams, 2019/07/15
- bug#30074: 26.0; Add function(s) for current monitor info, Lars Ingebrigtsen, 2019/07/15
- bug#30074: 26.0; Add function(s) for current monitor info, Andy Moreton, 2019/07/15
bug#30074: 26.0; Add function(s) for current monitor info, Drew Adams, 2019/07/14