> What I need to know is what the available range of coordinates are
> that are visible on the current display. I can get the width with
> display-pixel-width, but at least on the Mac, it doesn't always start
> at 0. For example, (frame-parameter (selected-frame) 'left) can
> return something like (+ -1045) if the frame in question is on the
> left screen of a multi-screen setup (with the menu bar = origin on
> the right).
>

Well I certainly couldn't find it either but if you do there's
more problems you will need to deal with.  Supplying negative
coordinates to set-frame-parameter causes the position to be
relative to the righthand side of both the frame and screen.
That is, (set-frame-parameter (selected-frame) 'left -1) puts
the inside right edge of the frame one pixel from the right edge
of the display.  So on my XP machine I had to use this to get
the frame's right edge entirely within the lefthand display.

(set-frame-parameter
 (selected-frame) 'left
 (- (+ (display-pixel-width x-display-name)
       (* 3 (frame-parameter (selected-frame) 'border-width)))))

I'm not sure how generic you want your support to be but there
is nothing that forces additional monitors to have the same size
as the primary and on my machine I can configure the secondary
display anywhere along the border of the primary display.
Meaning above, below, half way down one side... .  This, along
with the monitor size being different, it's a real mess!

I also found that if my frame has negative coordinates the mouse
wheel doesn't work.  I was eventually forced to rearrange my
work area to have the primary on the left.  I reported the problem
as a bug but don't know if it was ever fixed.  It's been months
since I've tried it.

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to