bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18637: 24.4.50; doc of frame parameter DISPLAY vs actual value on MS


From: Andy Moreton
Subject: bug#18637: 24.4.50; doc of frame parameter DISPLAY vs actual value on MS Windows
Date: Tue, 07 Oct 2014 19:35:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt)

On Tue 07 Oct 2014, Eli Zaretskii wrote:

>> The relevant code snippet is what I sent earlier
>> (`frcmds-available-screen-pixel-bounds'), plus functions
>> `maximize-frame' and `restore-frame', here:
>> http://www.emacswiki.org/emacs-en/download/frame-cmds.el> 
>> In those two commands I do the following.
>> 
>> For `maximize-frame':
>> 
>> 1. Save the current `left' etc. as parameters `restore-left' etc.
>> 2. Calculate the available screen size, using
>>    `frcmds-available-screen-pixel-bounds'.
>> 3. Set `left' and `top' both to 0 and `width' and `height' to the
>>    calculated screen size.
>> 
>> For `restore-frame':
>> 
>> Restore `left' etc. from the saved values `restore-left' etc.
>
> That's a lot of code, and I have no way of trying it.

I have a multi-monitor system, but I'm not going to perform experiments
without a clearer recipe. I did try rearranging the physical monitor
layout as follows (which makes it quite easy to lose the position of the
cursor). Things may get more confusing with three or more monitors...

;; Two monitors arranged physically as:
;;  +---------+
;;  |         |
;;  |    2    |+---------+
;;  |         ||         |
;;  +---------+|    1    |
;;             |         |
;;             +---------+
(display-monitor-attributes-list)
;; ==>
(((geometry 0 0 1920 1080)
  (workarea 0 0 1920 1050)
  (mm-size 677 381)
  (name . "\\\\.\\DISPLAY1")
  (frames))
 ((geometry -1680 -646 1680 1050)
  (workarea -1680 -646 1680 1050)
  (mm-size 593 370)
  (name . "\\\\.\\DISPLAY2")
  (frames)))

(display-pixel-height)  ;; ==> 1726
(display-pixel-width)   ;; ==> 3600

(display-mm-height)     ;; ==>  609
(display-mm-width)      ;; ==> 1269

> I think at this stage it is best for the user in question to try some
> simple code that reports frame coordinates and creates a frame given
> specific coordinates, and then see what that means for us.
>
> Oh, and I think this is no longer about the docs, so probably a new
> bug report is in order, specifically about restoring frames on
> multi-monitor displays.

True, as long as the meaning of geometry/workarea and the coordinate
system are given a little more detail in the docs.

    AdnyM






reply via email to

[Prev in Thread] Current Thread [Next in Thread]