GNU bug report logs - #5721
Feature request: Function that returns absolute coordinates

Previous Next

Package: emacs;

Reported by: irieshinsuke <at> yahoo.co.jp

Date: Mon, 15 Mar 2010 14:34:02 UTC

Severity: wishlist

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 5721 <at> debbugs.gnu.org (full text, mbox):

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: irieshinsuke <at> yahoo.co.jp
Cc: 5721 <at> debbugs.gnu.org, Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#5721: Feature request: Function that returns
	absolute	coordinates
Date: Tue, 01 Jun 2010 10:16:08 +0900
>>>>> On Mon, 31 May 2010 19:28:07 +0900, IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp> 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
				mituharu <at> math.s.chiba-u.ac.jp




This bug report was last modified 11 years and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.