From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#28621: Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments Date: Sat, 30 Sep 2017 19:12:35 +0200 Message-ID: <59CFD083.40407@gmx.at> References: <83k20h5m2x.fsf@gnu.org> <59CF56AF.3090008@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1506791636 13290 195.159.176.226 (30 Sep 2017 17:13:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Sep 2017 17:13:56 +0000 (UTC) Cc: 28621@debbugs.gnu.org To: rswgnu@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 30 19:13:51 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyLKo-00030o-EB for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Sep 2017 19:13:50 +0200 Original-Received: from localhost ([::1]:39899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyLKv-0008Ls-Tw for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Sep 2017 13:13:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyLK5-0007xD-Ee for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 13:13:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyLK2-0007RD-60 for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 13:13:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60931) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyLK2-0007R7-2z for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 13:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dyLK1-0000eG-TF for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 13:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Sep 2017 17:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28621 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28621-submit@debbugs.gnu.org id=B28621.15067915712476 (code B ref 28621); Sat, 30 Sep 2017 17:13:01 +0000 Original-Received: (at 28621) by debbugs.gnu.org; 30 Sep 2017 17:12:51 +0000 Original-Received: from localhost ([127.0.0.1]:41379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyLJr-0000ds-DX for submit@debbugs.gnu.org; Sat, 30 Sep 2017 13:12:51 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:60825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyLJp-0000dd-RP for 28621@debbugs.gnu.org; Sat, 30 Sep 2017 13:12:50 -0400 Original-Received: from [192.168.1.100] ([213.162.68.235]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MH0eg-1eB0mG0uQ6-00Dmjk; Sat, 30 Sep 2017 19:12:42 +0200 In-Reply-To: X-Provags-ID: V03:K0:bpTGUbANBkDhqtrJj/+spfp97gXbgNqSETJTSsU3C57rTtX/5Dx lrBxhBbTcorJ8fOntr5deDrANOIaPxD+RsDuPo83NCqpDLAPG437AVsFrzD2UIX9SCv9d2P 7GQw83bY6RcCGF5u7oJ78OZIAXZA5Z65NKnPbO0F/QEfJEZtLVhZMQqQs/v8Xg1D0JYiWfx VQNnabd/0pTp7IBjm1pPQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:GsLpzITHltU=:gDsuoHHo/oPqp4k0e/39di th4z41SAcrrDRe6+eBAS4dl90djfy3g3DVmK3InWWqdZRo7VdCkvpZ513ZBlEMJ9J3MWFAfUJ 1M+CnKRDYBDeIshYdD3GWGTrPXHUp00KoRQ7BT0RbaNlZ1NNzvhBWLtI+GqVJcbPLLg8IxTGY ZvYyFhKbMPnE8UzeKra1PYSLbjPYFRoGcZCEWH4gPLhk6IXW+xYDLGoCp/fbAzoEc9XMEcQ7l yphIqoL1H0V+nBg2nACuQDglAxKcPSvC5isrBu0dJEvhtxiJny7BvXvKb7/I/oHtT1S/wYSY7 j3eDrnS98IP0p1xBe/KIOYOBC5nrCjlfg5k0rIt2Y8QjjSrekyYi9tITC0cImHBw8uieCTqOU rdbdNzJ1bjjPw3hMdi97TVGlkLVBXibR/r+TmXA0Nv821gwqQbM+x5V4wVUutLRr58Ng5QO2e FW7j5rGwKzMaifcMy7hOfmpejDcXzBhd+ge/y0OJwbYws1jlrZqIXcpSYghGS/J28GgiwP22+ yEpdaGQ02n2zvleH/m8h6846BiNnNoESAdlGmJbXepgtydvLrxIRhGDGUADKgFxRng06KFC1b OF+gPxmtUhbrQdjWSNQ7PQSKGmFGVs8FPQkS/736HGF3kmminkcm7kcI/48x+TrzPdRFbknfC RO37sAf7kfndt3mGwlHCVjSt0Caq6n5U3VbTUt8ZlZS1Lam/X4RwUkwlSUbNOWVf7T8/XgmtM cPsi4k695SiaOep26/Uf5BeB4Os0po93DMdjQtg3IgU3ZrRa5poTo1jsa7nALxtV8n6Ljqsv X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:137697 Archived-At: > This speaks to my point in my most recent prior message, "If we just h= ad a > way to get a window from a set of coordinates within a frame, then I t= hink > this would help solve a lot of this." If the event-end of Emacs mouse= drag > events included a window, rather than a frame, when the endpoint of th= e > drag is at a position unique to a window (considering Z-frame order), = I > think that would solve all these issues and simplify parts of the posn= code. Take the position of the event-end (if it's a frame) and translate it into absolute screen coordinates (the Elisp manual should give you enough clues to do that). Or, try =E2=80=98mouse-absolute-pixel-position= =E2=80=99 - it should give you the screen position of the mouse at that time so you can ignore the event completely. Then walk all your windows and compare that position with whatever =E2=80=98window-absolute-pixel-edges=E2=80=99 returns for that window. I= f you have two or more positives, run =E2=80=98frame-list-z-order=E2=80=99 and compare t= he result against those windows' frames. No hands, IMHO. martin