From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Display-relative coordinates Date: Fri, 29 Jul 2016 08:38:14 -0700 (PDT) Message-ID: References: <831t2dsu3y.fsf@gnu.org> <579A580B.9010507@gmx.at> <3c6ba762-f120-4189-833a-60ebcbcc1e65@default> <579AEF99.30108@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1469807170 322 80.91.229.3 (29 Jul 2016 15:46:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jul 2016 15:46:10 +0000 (UTC) To: martin rudalics , Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 29 17:45:58 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bT9z2-00063P-7h for ged-emacs-devel@m.gmane.org; Fri, 29 Jul 2016 17:45:56 +0200 Original-Received: from localhost ([::1]:60268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT9yw-0007rb-7F for ged-emacs-devel@m.gmane.org; Fri, 29 Jul 2016 11:45:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT9rp-0001VY-NK for emacs-devel@gnu.org; Fri, 29 Jul 2016 11:38:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bT9ro-00033J-Qo for emacs-devel@gnu.org; Fri, 29 Jul 2016 11:38:29 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:29645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT9rk-00031S-Rn; Fri, 29 Jul 2016 11:38:25 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6TFcJMY029587 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jul 2016 15:38:20 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u6TFcIEY005601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Jul 2016 15:38:19 GMT Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u6TFcFVU015209; Fri, 29 Jul 2016 15:38:17 GMT In-Reply-To: <579AEF99.30108@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206224 Archived-At: > > It would still be useful, I think, to have a function that returns > > directly the screen-relative pixel coordinates >=20 > =E2=80=98window-absolute-pixel-position=E2=80=99 does that already. I see. Sounds good to me. As I said, in the Emacs 25 build I have, which is not recent, for a measured value of 354 pixels it returned 335 pixels. And that difference corresponds, I guess, to the fact that I measured to the cursor bottom, whereas `w-a-p-p' returns the distance (height) to the "upper/left corner of the glyph at POSITION." The height of a line in emacs -Q, as Eli says, is 16, and 354 - 16 =3D 338, which is ~335. I only measured visually, and my eye was probably off by 3 pixels for this.