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

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Tue, 01 Jun 2010 10:16:08 +0900

>>>>> On Mon, 31 May 2010 19:28:07 +0900, IRIE Shinsuke <[email-masked]> said:

> Sorry, I forgot to reply to your question.
>> I can understand posn-absolute-x-y and window-absolute-pixel-edges, but can 
>> you add some details on what posn-at-absolute-x-y should do?

> Umm... I suggest the new frame parameters like `inside-left' and
> `inside-top', which show the top left coordinates of an X window
> corresponding to `window-id'. See below:

> A------------------------+
> | File Edit Options ...  |  `left'       => horizontal position of A
> +B----------------------++  `top'        => vertical position of A
> ||                      ||  `inside-left'=> horizontal position of B
> ||                      ||  `inside-top' => vertical position of B
> ||                      ||
> ||-U:**- *scratch* (lisp||
> ||______________________||
> +------------------------+

>> I'd rather not introduce another position format that looks like the old, but 
>> where pixels are absolute rather than relative.

> I believe Emacs should provide some ways to obtain absolute coordinates.
> Recently I created ibus.el, which is an IBus client for Emacs, but it
> requires the external program to calculate the absolute coordinates of
> candidate window...

I'd rather suggest introducing some conversion functions between
relative and absolute coordinate systems.  Newer versions of Mac OS X
provides "Resolution Independence" that allows users to specify a
scale factor:

  http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/HiDPIOverview/HiDPIConcepts/HiDPIConcepts.html

With the scale factor, 1 pixel in the relative coordinate system no
longer always correspond to 1 pixel in the absolute one.  Thus one
cannot determine the corresponding absolute coordinates only from
`inside-left' and `inside-top'.

				     YAMAMOTO Mitsuharu
				[email-masked]