From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#5721: Feature request: Function that returns absolute coordinates Date: Sun, 29 Sep 2013 17:41:53 +0200 Message-ID: <87mwmvtz26.fsf@hochschule-trier.de> References: <4B9E4521.9030909@yahoo.co.jp> <87fvsoemnj.fsf@hochschule-trier.de> <52480060.7020309@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380469399 20886 80.91.229.3 (29 Sep 2013 15:43:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Sep 2013 15:43:19 +0000 (UTC) Cc: 5721@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 17:43:22 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 1VQJ9T-00070p-AI for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 17:43:19 +0200 Original-Received: from localhost ([::1]:45126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJ9S-0003kY-Vg for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 11:43:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJ9J-0003kB-Nu for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:43:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQJ9C-0002fO-2j for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:43:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQJ9B-0002fC-VB for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VQJ9B-0001MM-K7 for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2013 15:43: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.13804693335164 (code B ref 5721); Sun, 29 Sep 2013 15:43:01 +0000 Original-Received: (at 5721) by debbugs.gnu.org; 29 Sep 2013 15:42:13 +0000 Original-Received: from localhost ([127.0.0.1]:44944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQJ8P-0001LE-0B for submit@debbugs.gnu.org; Sun, 29 Sep 2013 11:42:13 -0400 Original-Received: from gateway-b.fh-trier.de ([143.93.54.182]:52272) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQJ8M-0001L5-Sc for 5721@debbugs.gnu.org; Sun, 29 Sep 2013 11:42:12 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Original-Received: from luca (dslb-084-059-253-081.pools.arcor-ip.net [84.59.253.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id 6BB8817B4B0; Sun, 29 Sep 2013 17:41:54 +0200 (CEST) Original-Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VQJ85-000460-M9; Sun, 29 Sep 2013 17:41:53 +0200 In-Reply-To: <52480060.7020309@gmx.at> (martin rudalics's message of "Sun, 29 Sep 2013 12:26:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:78800 Archived-At: martin rudalics writes: > I'm not sure whether we can correctly retrieve the decorations always > and everywhere. 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). > But note that for maximized and full-screen frames there usually are > no outer borders and with full-screen frames there's no titlebar > either. How does your patch handle these? > The patch isn't perfect, as in I only tested it with GTK. Are you talking about the frame parameter `border-width' or `internal-border-width' ? I think, as long as we can now the absolute position of (the window at) C, this should probably make no difference, since it shouldn't matter how much of the space of (C - A) is spent on the border or a title (?). 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. I think we can figure this out, when it becomes clear, which absolute position `window-absolute-pixel-edges' should actually return. I think it should be C. -ap