GNU bug report logs - #34516
Multi-monitor frame sets

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 17 Feb 2019 21:10:02 UTC

Severity: normal

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: 34516 <at> debbugs.gnu.org
Subject: bug#34516: Multi-monitor frame sets
Date: Tue, 19 Feb 2019 23:29:47 +0000
On Tue 19 Feb 2019, Juri Linkov wrote:

>> Why guess ? Read the documentation for `display-monitor-attributes-list'
>> which describes the meaning of the list elements in great detail.
>>
>> Note that you will need to take note of the `workarea' element of the
>> list which describes the usuable space on a given monitor (which
>> excludes space for toolbars etc that are not available to display a
>> frame).
>
> Thanks for the information.  Do you think it's possible to use
> the list elements from `display-monitor-attributes-list'
> to unambiguously select a monitor where to make a new frame?

Yes. The list describes all monitors available for displaying frames, so
any new frame you wish to create must be shown (at least partially) on
one of those monitors.

The monitors may have different sizes, and be physically arranged in
fairly arbitrary ways. For example, on Windows (from bug#21173):

  +----------+
  |          |
  | DISPLAY2 |
  |          |+----------+
  +----------+|          |
              | DISPLAY1 |
              | (primary)|
              +----------+

  (display-monitor-attributes-list)
  ;; ==>
  '(((geometry 0 0 1920 1080)
     (workarea 0 0 1920 1050)
     (mm-size 677 381)
     (name . "\\\\.\\DISPLAY1")
     (frames ...))
    ((geometry -1680 -1050 1680 1050)
     (workarea -1680 -1050 1680 1050)
     (mm-size 593 370)
     (name . "\\\\.\\DISPLAY2")
     (frames ...)))

  ;; For a frame on DISPLAY2:
  (frame-parameter (window-frame) 'left) ;; ==>  (+ -1668)
  (frame-parameter (window-frame) 'top)  ;; ==>  (+ -1046)






This bug report was last modified 6 years and 51 days ago.

Previous Next


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