From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#5721: Feature request: Function that returns absolute coordinates Date: Tue, 30 Mar 2010 19:50:42 +0200 Message-ID: <4BB239F2.3040708@swipnet.se> References: <4B9E4521.9030909@yahoo.co.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269971817 21905 80.91.229.12 (30 Mar 2010 17:56:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 17:56:57 +0000 (UTC) Cc: 5721@debbugs.gnu.org To: IRIE Shinsuke Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 30 19:56:52 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NwfgJ-0004QO-Cm for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Mar 2010 19:56:51 +0200 Original-Received: from localhost ([127.0.0.1]:53902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwfgI-00088J-Te for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Mar 2010 13:56:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwffX-0007go-NS for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 13:56:03 -0400 Original-Received: from [140.186.70.92] (port=49351 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwffS-0007e6-It for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 13:56:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwffO-0008CE-CL for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 13:55:58 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60322) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwffN-0008C7-JV for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 13:55:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nwfag-0003ft-3u; Tue, 30 Mar 2010 13:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Mar 2010 17:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5721 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5721-submit@debbugs.gnu.org id=B5721.126997145214118 (code B ref 5721); Tue, 30 Mar 2010 17:51:02 +0000 Original-Received: (at 5721) by debbugs.gnu.org; 30 Mar 2010 17:50:52 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwfaV-0003ff-0y for submit@debbugs.gnu.org; Tue, 30 Mar 2010 13:50:51 -0400 Original-Received: from smtprelay-h12.telenor.se ([62.127.194.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwfaT-0003fa-Pw for 5721@debbugs.gnu.org; Tue, 30 Mar 2010 13:50:50 -0400 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-h12.telenor.se (Postfix) with ESMTP id 0DC6FEA510 for <5721@debbugs.gnu.org>; Tue, 30 Mar 2010 19:50:57 +0200 (CEST) X-SENDER-IP: [85.225.45.110] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqsyAG/WsUtV4S1uPGdsb2JhbACDEpgbDAEBAQE1La9bkF6BK4JragQ X-IronPort-AV: E=Sophos;i="4.51,335,1267398000"; d="scan'208";a="57584683" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb2.telenor.se with ESMTP; 30 Mar 2010 19:50:44 +0200 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id E38DF7FA01A; Tue, 30 Mar 2010 19:50:42 +0200 (CEST) User-Agent: Thunderbird 2.0.0.24 (X11/20100317) In-Reply-To: <4B9E4521.9030909@yahoo.co.jp> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 30 Mar 2010 13:51:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35820 Archived-At: 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.