Subject: Re: bug#5721: Feature request: Function that returns absolute coordinates

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Fri, 16 Jul 2010 17:37:37 +0900

>>>>> On Fri, 16 Jul 2010 08:38:44 +0200, Jan Djärv <[email-masked]> said:

>> 2) Call a terminal-specific function that converts frame-relative
>> coordinates to absolute coordinates.  That can be done by the
>> following "idiom".
>> 
>> x += f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f); y += f->top_pos
>> + FRAME_OUTER_TO_INNER_DIFF_Y (f);
>> 
>> on X11 and
>> 
>> ClientToScreen (FRAME_W32_WINDOW (f),&pt)
>> 
>> on W32, I guess.

> You left out Nextstep/OSX.

I did so because if I coded it correctly, that would become
inconsistent with the other part of the NS port.  I'd leave it to
those who are familiar with the NS port code and design.

>> By the way, window-(inside-)absolute-pixel-edges doesn't seem to
>> take account of title bar height.  Is that correct?

> Why should it?  The titlebar isn't an Emacs window in X, it belongs
> to the window manager.  Top/left does not point at it, it points at
> the Emacs frame.

Is the following the intended behavior?  I tested it with Mac OS X
10.6, GTK+ build, the trunk.

1. $ emacs -Q -D -geometry +100+100 &
2. (frame-parameter nil 'top) C-j
   => 100
3. (window-absolute-pixel-edges) C-j
   => (100 100 756 678)

				     YAMAMOTO Mitsuharu
				[email-masked]