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


View this message in rfc822 format

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp>
Cc: 5721 <at> debbugs.gnu.org
Subject: bug#5721: Feature request: Function that returns absolute	coordinates
Date: Tue, 30 Mar 2010 19:50:42 +0200
IRIE Shinsuke skrev:
> Recently, I wrote pos-tip.el which allows users to easily show tooltip on
> arbitrary buffer position (http://www.emacswiki.org/emacs/PosTip). However,
> external program xwininfo must be called for calculating the absolute
> coordinates in which tooltip is shown because the location of tooltip must
> be specified by absolute coordinates, so this program can work only under X
> window system.
> 
> Some persons say, "We can calculate absolute coordinates by using 
> `frame-parameter' and `window-pixel-edges'", but it's a mistake.
> 
> To calculate absolute coordinates under X window system, users must also
> obtain the pixel height of menu-bar and tool-bar and the pixel width of
> frame extents, because `window-pixel-edges' returns the location of window
> relative to a X window corresponding to `window-id', but `frame-parameter'
> returns the location of a X window corresponding to `outer-window-id' or
> `parent-id'. That is, these two functions regard the different X windows as
> `frame'. Unfortunately, there is no way to obtain the tool-bar height etc.
> without calling external programs such as xwininfo.
> 
> I also encountered this problem when I wrote scim-bridge.el 
> (http://www.emacswiki.org/emacs/ScimBridge) because SCIM requires the 
> clients to send the absolute coordinates of cursor location.
> 
> Please implement the functions like `posn-absolute-x-y', 
> `posn-at-absolute-x-y', and `window-absolute-pixel-edges'.
> 

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?

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

	Jan D.






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.