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: Thu, 15 Jul 2010 09:50:05 +0200 Message-ID: <4C3EBDAD.1040800@swipnet.se> References: <4B9E4521.9030909@yahoo.co.jp> <4C2C8C02.1010906@swipnet.se> <4C2D9009.60405@swipnet.se> <4C3DD633.7040004@swipnet.se> <4C3EA59E.40300@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1279180840 12512 80.91.229.12 (15 Jul 2010 08:00:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2010 08:00:40 +0000 (UTC) Cc: 5721@debbugs.gnu.org To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 15 10:00:37 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 1OZJMv-0000yG-Mc for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Jul 2010 10:00:34 +0200 Original-Received: from localhost ([127.0.0.1]:56798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZJMu-0004e0-7w for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Jul 2010 04:00:32 -0400 Original-Received: from [140.186.70.92] (port=36232 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZJMk-0004dC-6m for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2010 04:00:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZJMi-0004zH-GG for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2010 04:00:21 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39111) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZJMi-0004z8-El for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2010 04:00:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OZJCm-0007eD-EZ; Thu, 15 Jul 2010 03:50:04 -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: Thu, 15 Jul 2010 07:50:04 +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.127918020329392 (code B ref 5721); Thu, 15 Jul 2010 07:50:04 +0000 Original-Received: (at 5721) by debbugs.gnu.org; 15 Jul 2010 07:50:03 +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 1OZJCi-0007dx-Qo for submit@debbugs.gnu.org; Thu, 15 Jul 2010 03:50:02 -0400 Original-Received: from smtprelay-h31.telenor.se ([213.150.131.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZJCh-0007dr-9Y for 5721@debbugs.gnu.org; Thu, 15 Jul 2010 03:50:00 -0400 Original-Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id CCC8DE9DB5 for <5721@debbugs.gnu.org>; Thu, 15 Jul 2010 09:50:08 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsM1AANbPkxV4S0jPGdsb2JhbACHcZgCDAEBAQE1Lb5VgnAIgiwEhCCNbQ X-IronPort-AV: E=Sophos;i="4.55,206,1278280800"; d="scan'208";a="547995910" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb3.telenor.se with ESMTP; 15 Jul 2010 09:50:07 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id D896D7FA05A; Thu, 15 Jul 2010 09:50:06 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 15 Jul 2010 03:50:04 -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:38534 Archived-At: YAMAMOTO Mitsuharu skrev 2010-07-15 08.49: > > It's the source of complication to divide absolute into scaled and > unscaled (the latter is required anyway because window system APIs > require that). It's much simpler and cleaner to consider that > absolute is alway unscaled and relative is always scaled. > >> Placing tooltips for example is much more common than placing >> frames. Doing so based on scaled coordinates is no problem. > > I don't understand how placement of tooltips and frames are different. > The documentation of tooltip-frame-parameters says `left' and `top' is > specified with absolute position. Do you mean assigning different > meanings to these frame parameters depending on whether it is for a > tooltip or for a usual frame? No, just that placing of tooltips is very common and just one of those things that does f->left_pos + some offset. > >> The alternative, to use unscaled, would make Emacs internals >> everywhere have to handle two coordinate systems all the time. To >> knowingly introduce such an overhead on everything is madness. > > The Mac port already takes account of scaling factor with the policy I > explained. That means no change is necessary for the platform > independent part. The conversion is necessary only when the current > X11 code is using the "idiom"s like `x += f->left_pos + > FRAME_OUTER_TO_INNER_DIFF_X (f)'. I think your "only" is quite big. Lots of code, C and Lisp, does that kind of calculation. Jan D.