[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: IRIE Shinsuke
Subject: bug#5721: Feature request: Function that returns absolute coordinates
Date: Mon, 15 Mar 2010 23:33:05 +0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; ja; rv: Gecko/20100227 Thunderbird/3.0.3

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'.

IRIE Shinsuke

reply via email to

[Prev in Thread] Current Thread [Next in Thread]