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:05:43 +0200 Message-ID: <4A35A160-E728-4617-A65E-D79EC75B88D2@swipnet.se> References: <4B9E4521.9030909@yahoo.co.jp> <87fvsoemnj.fsf@hochschule-trier.de> <52480060.7020309@gmx.at> <87mwmvtz26.fsf@hochschule-trier.de> <6CBDC204-ABA9-41D4-BD59-4B66DF82B9D9@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380470775 2156 80.91.229.3 (29 Sep 2013 16:06:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Sep 2013 16:06: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:06:15 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 1VQJVf-00021m-0Z for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 18:06:15 +0200 Original-Received: from localhost ([::1]:45312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJVe-0005hL-GF for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 12:06:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJVW-0005gz-Ux for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:06:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQJVS-0000o7-4C for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:06:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJVS-0000o3-0l for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VQJVR-0001vp-P4 for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 12:06:01 -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:06:01 +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.13804707477400 (code B ref 5721); Sun, 29 Sep 2013 16:06:01 +0000 Original-Received: (at 5721) by debbugs.gnu.org; 29 Sep 2013 16:05:47 +0000 Original-Received: from localhost ([127.0.0.1]:44973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQJVC-0001vG-BH for submit@debbugs.gnu.org; Sun, 29 Sep 2013 12:05:46 -0400 Original-Received: from mail01.bdtv.se ([176.10.222.34]:33745) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1VQJVA-0001v6-4y for 5721@debbugs.gnu.org; Sun, 29 Sep 2013 12:05:44 -0400 Original-Received: (qmail 1654 invoked by uid 89); 29 Sep 2013 16:05:43 -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:05:43 -0000 Original-Received: from [172.20.199.13] (unknown [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id D6C6F1A00FB; Sun, 29 Sep 2013 16:05:42 +0000 (UTC) In-Reply-To: <6CBDC204-ABA9-41D4-BD59-4B66DF82B9D9@swipnet.se> 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:78803 Archived-At: Hello. 29 sep 2013 kl. 18:02 skrev Jan Dj=E4rv : > Hello. >=20 > 29 sep 2013 kl. 17:41 skrev Andreas Politz = : >=20 >> 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 >=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. >=20 > 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. Forgot to mention that the window manager window that the title bar is = drawn in does not need to be a parent of any Emacs X window. In that = case you can not get the size of the decorations at all. Jan D. >=20 >>=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. >=20 > Race conditions are common when a window manager is involved. Another = reason to keep pixels private and not export them to Elisp. >=20 > Jan D.. >=20