From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 30074@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) [thread overview]
Message-ID: <3dfc61af-838b-49e0-bd81-2cc3ed89fb04@default> (raw)
In-Reply-To: <87k1cky0e5.fsf@mouse.gnus.org>
> > 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.
prev parent reply other threads:[~2019-07-14 22:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 23:08 bug#30074: 26.0; Add function(s) for current monitor info Drew Adams
2019-07-14 17:46 ` Lars Ingebrigtsen
2019-07-14 19:49 ` Juri Linkov
2019-07-15 10:13 ` Lars Ingebrigtsen
2019-07-15 15:21 ` Drew Adams
2019-07-15 15:25 ` Lars Ingebrigtsen
2019-07-15 16:17 ` Drew Adams
2019-07-15 16:05 ` Andy Moreton
2019-07-15 16:24 ` Drew Adams
2019-07-15 16:35 ` Lars Ingebrigtsen
2019-07-15 16:42 ` Andy Moreton
2019-07-14 22:07 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3dfc61af-838b-49e0-bd81-2cc3ed89fb04@default \
--to=drew.adams@oracle.com \
--cc=30074@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.