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, Juri Linkov <juri <at> linkov.net>
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.




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.