Subject: Re: bug#3233: 23.0.93; [NS] Regression in x-display-pixel-width

From: Ian Eure <[email-masked]>
Date: Wed, 6 May 2009 21:50:09 -0700

On May 6, 2009, at 6:34 PM, Stefan Monnier wrote:

>>  (let ((disp (frame-parameter frame 'display)))
>
> Why not use `frame' directly?  The `display' frame parameter is
> fundamentally specific to X11 (although we kinds of try to make Emacs
> pretend that it also exists under other GUIs).
>
Because I didn't know it was possible, because the docstrings refer to  
a `display' argument without elaborating on what that means.

>> I don't know how (display-pixel-height) handles multihead displays,  
>> but it
>> seems saner to explicitly pass the display the frame occupies.
>
> The "display" you pass is just some string.  So "right" way would be  
> to
> pass the corresponding terminal (i.e. (frame-terminal frame)), but
> most/all the functions that operate on terminals accept frames as well
> (since terminal object were only introduced in Emacs-23 as pat of the
> multi-tty code, so frames were previously the canonical way to refer  
> to
> a display).
Looks like it may be moot, since the info docs say:

"For graphical terminals, note that on "multi-monitor" setups this  
refers to the pixel width for all physical monitors associated with  
DISPLAY."

So it may not be possible to handle in a sane manner, i.e. centering  
on the display the frame occupies.

  - Ian