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

From: Drew Adams <[email-masked]>
Date: Tue, 7 Oct 2014 13:25:40 -0700 (PDT)

> 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

Thanks for the offer, Andy.  I don't have a better recipe to give,
unfortunately.  I've mentioned in this thread all of the info I have.

I think it might be enough if you tried the `maximize-frame' and
`restore-frame' commands in frame-cmds.el, especially if (I'm
guessing, based on the conversation with Eli) you have one monitor
that is smaller than the other.

It sounds like perhaps you will see a frame that you maximize or
restore this way jump from one frame to another.  Perhaps that will
happen more if most of the frame before the operation is in fact
shown on the other frame.

But the OP did not mention that.  His report seemed to suggest that
the frame was shown completely in one frame and then jumped to
another frame when it was maximized (or restored?).

The frame-cmds.el code just changes frame parameters `left', `top',
`width', and `height'.  In principle, restoring just resets the
original values for these, and maximizing sets them to values that
fill the screen (which is not necessarily the same thing as the
monitor).