From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.bugs Subject: bug#28620: Interact directly on Emacs bug#28620: mouse drag event records wrong release window Date: Wed, 4 Oct 2017 16:07:56 -0400 Message-ID: References: <8360bx340d.fsf@gnu.org> <8360bw19es.fsf@gnu.org> <20171003224017.GA51637@breton.holly.idiocy.org> <20171004163048.GA52414@breton.holly.idiocy.org> <20171004185900.GA52514@breton.holly.idiocy.org> Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11418c4eb72a06055abe2b17" X-Trace: blaine.gmane.org 1507147753 9660 195.159.176.226 (4 Oct 2017 20:09:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Oct 2017 20:09:13 +0000 (UTC) Cc: 28620@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 04 22:09:07 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 1dzpyZ-0001aU-To for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Oct 2017 22:09:04 +0200 Original-Received: from localhost ([::1]:36681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzpyh-00085o-Da for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Oct 2017 16:09:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzpyb-00085i-ST for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2017 16:09:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzpyY-0003rd-N6 for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2017 16:09:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40593) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzpyY-0003rR-KM for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2017 16:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzpyY-0005N3-Em for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2017 16:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Weiner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Oct 2017 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28620 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28620-submit@debbugs.gnu.org id=B28620.150714771820608 (code B ref 28620); Wed, 04 Oct 2017 20:09:02 +0000 Original-Received: (at 28620) by debbugs.gnu.org; 4 Oct 2017 20:08:38 +0000 Original-Received: from localhost ([127.0.0.1]:49274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzpyA-0005MI-B2 for submit@debbugs.gnu.org; Wed, 04 Oct 2017 16:08:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzpy8-0005M4-B7 for 28620@debbugs.gnu.org; Wed, 04 Oct 2017 16:08:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzpy0-0003VV-2J for 28620@debbugs.gnu.org; Wed, 04 Oct 2017 16:08:31 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzpxz-0003VN-Uo for 28620@debbugs.gnu.org; Wed, 04 Oct 2017 16:08:27 -0400 Original-Received: from mail-qt0-f177.google.com ([209.85.216.177]:53991) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1dzpxz-0007wV-LT for 28620@debbugs.gnu.org; Wed, 04 Oct 2017 16:08:27 -0400 Original-Received: by mail-qt0-f177.google.com with SMTP id 47so21503369qts.10 for <28620@debbugs.gnu.org>; Wed, 04 Oct 2017 13:08:27 -0700 (PDT) X-Gm-Message-State: AMCzsaUd4VrdhB2NjyQ58i+9YXiwqsQybtFElJ3oQnvchRfOJy/akI+B GNMDLoIfHteIG6F8iUTXexnYRoP1+FT6f89R2hs= X-Google-Smtp-Source: AOwi7QBzueAXurmG2KGvfM+05u0ftX/jxndcMU6+4urbZLiSyYSgunoMUO3+qjEG5pSgeTd+Zg7yWHEY+BYGFDmZcXU= X-Received: by 10.200.57.29 with SMTP id s29mr31435484qtb.309.1507147707257; Wed, 04 Oct 2017 13:08:27 -0700 (PDT) Original-Received: by 10.237.34.225 with HTTP; Wed, 4 Oct 2017 13:07:56 -0700 (PDT) In-Reply-To: <20171004185900.GA52514@breton.holly.idiocy.org> X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:137920 Archived-At: --001a11418c4eb72a06055abe2b17 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Oct 4, 2017 at 2:59 PM, Alan Third wrote: > > It looks like there=E2=80=99s maybe a neater way to get the current frame > under the mouse... > > Lisp_Object frame =3D Qnil; > NSWindow *w =3D [NSApp windowWithWindowNumber: > [NSWindow windowNumberAtPoint:[NSEvent > mouseLocation] > belowWindowWithWindowNumber:0]]; > if (w !=3D nil) > XSETFRAME (frame, ((EmacsView *)[w delegate])->emacsframe); > > The =E2=80=8BmouseDown=E2=80=8B function (called by the various mouseUp fun= ctions) uses `emacsframe' to set the appropriate frame. How does the above modify emacsframe? Doesn't XSETFRAME just set the value of the local `frame'? Bob --001a11418c4eb72a06055abe2b17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Oct 4, 20= 17 at 2:59 PM, Alan Third <ala= n@idiocy.org> wr= ote:
=

It looks like there=E2=80=99s maybe a neater way to get the current frame under the mouse...

=C2=A0 =C2=A0 Lisp_Object frame =3D Qnil;
=C2=A0 =C2=A0 NSWindow *w =3D [NSApp windowWithWindowNumber:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0[NSWindow windowNumberAtPoint:[NSEvent mouseLocation]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0belowWindowWithWindowNumber:0]];
=C2=A0 =C2=A0 if (w !=3D nil)
=C2=A0 =C2=A0 =C2=A0 XSETFRAME (frame, ((EmacsView *)[w delegate])->emac= sframe);


The =E2=80=8BmouseDown=E2=80=8B function (calle= d by the various mouseUp functions) uses `emacsframe' to set the approp= riate frame.
How does the above modify emacsframe?=C2=A0 Doesn't XSETF= RAME just set the value of the local `frame'?

Bob


--001a11418c4eb72a06055abe2b17--