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: Sun, 29 Sep 2013 18:02:50 +0200 Message-ID: <6CBDC204-ABA9-41D4-BD59-4B66DF82B9D9@swipnet.se> References: <4B9E4521.9030909@yahoo.co.jp> <87fvsoemnj.fsf@hochschule-trier.de> <52480060.7020309@gmx.at> <87mwmvtz26.fsf@hochschule-trier.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380470595 663 80.91.229.3 (29 Sep 2013 16:03:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Sep 2013 16:03:15 +0000 (UTC) Cc: 5721@debbugs.gnu.org To: Andreas Politz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 18:03:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VQJSn-0007qQ-T0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 18:03:18 +0200 Original-Received: from localhost ([::1]:45303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJSn-0005AT-GS for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 12:03:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJSe-000541-Lh for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:03:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQJSZ-0008LT-4u for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:03:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJSZ-0008LO-2i for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VQJSY-0001rD-Cm for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2013 16:03: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.13804705747125 (code B ref 5721); Sun, 29 Sep 2013 16:03:02 +0000 Original-Received: (at 5721) by debbugs.gnu.org; 29 Sep 2013 16:02:54 +0000 Original-Received: from localhost ([127.0.0.1]:44969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQJSP-0001qq-A6 for submit@debbugs.gnu.org; Sun, 29 Sep 2013 12:02:53 -0400 Original-Received: from mail01.bdtv.se ([176.10.222.34]:33719) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1VQJSM-0001qh-Vi for 5721@debbugs.gnu.org; Sun, 29 Sep 2013 12:02:51 -0400 Original-Received: (qmail 1448 invoked by uid 89); 29 Sep 2013 16:02:50 -0000 Original-Received: from h-46-59-42-57.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.57) by mail01.bdtv.se with ESMTPA; 29 Sep 2013 16:02:50 -0000 Original-Received: from [172.20.199.13] (unknown [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id DB3EF1A01EC; Sun, 29 Sep 2013 16:02:49 +0000 (UTC) In-Reply-To: <87mwmvtz26.fsf@hochschule-trier.de> X-Mailer: Apple Mail (2.1510) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78802 Archived-At: Hello. 29 sep 2013 kl. 17:41 skrev Andreas Politz = : > martin rudalics writes: >=20 >> I'm not sure whether we can correctly retrieve the decorations always >> and everywhere. >=20 > It seems to me, that x_real_positions (xfns.c) does the right thing > independent of the WM, i.e. it searches the last parent before the = root > Window, assumes that it is the outermost Window of the frame and > computes the difference to the inner Emacs window (FRAME_X_WINDOW). >=20 This is known to be wrong. For example, if some Gtk+ version does = create separate X windows for menu bar and tool bar, the approach gives = the offset to the Emacs text area below the tool bar. If Gtk+ does NOT use separate windows for the menu- and/or tool-bar, but = instead uses the FRAME_X_WINDOW, you get the coordinates to the menu- = and/or tool bar. >=20 > The patch works for me with GTK, with internal-border-width and > full-screen set, with Xmonad as well as fluxbox. `border-width' in > make-frame does not seem to make any difference, it's probably set via = a > GTK style (?). Anyway the only problem I sometimes ran into is a race > condition, resulting in y_pixels_diff being to small. But this is = only > temporarily until I move the frame, i.e. x_real_positions gets called > and is most likely due to GTK windows bee-ing only partially mapped. >=20 > I think we can figure this out, when it becomes clear, which absolute > position `window-absolute-pixel-edges' should actually return. Race conditions are common when a window manager is involved. Another = reason to keep pixels private and not export them to Elisp. Jan D..