From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28620: Mouse drag event records wrong window for release when crossing frames Date: Sat, 27 Jul 2019 13:08:52 +0300 Message-ID: <8336irn617.fsf@gnu.org> References: <5881afff-b233-2a01-34c3-0d7c4225875b@gmx.at> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="18749"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rswgnu@gmail.com, scotto@sharpleaf.org, 28620@debbugs.gnu.org, 36269@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 27 12:10:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrJeS-0004n3-MJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 12:10:08 +0200 Original-Received: from localhost ([::1]:44776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrJeR-0001k6-BB for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 06:10:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46932) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrJeN-0001ij-3s for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:10:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrJeM-0006Lr-4n for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrJeM-0006Li-1E for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hrJeL-0005iU-OH for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2019 10:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28620 X-GNU-PR-Package: emacs Original-Received: via spool by 28620-submit@debbugs.gnu.org id=B28620.156422214821912 (code B ref 28620); Sat, 27 Jul 2019 10:10:01 +0000 Original-Received: (at 28620) by debbugs.gnu.org; 27 Jul 2019 10:09:08 +0000 Original-Received: from localhost ([127.0.0.1]:43610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrJdU-0005hG-BW for submit@debbugs.gnu.org; Sat, 27 Jul 2019 06:09:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrJdS-0005gc-2d; Sat, 27 Jul 2019 06:09:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hrJdM-0005l3-JF; Sat, 27 Jul 2019 06:09:00 -0400 Original-Received: from [176.228.60.248] (port=3704 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hrJdM-0006wS-2a; Sat, 27 Jul 2019 06:09:00 -0400 In-reply-to: <5881afff-b233-2a01-34c3-0d7c4225875b@gmx.at> (message from martin rudalics on Sat, 27 Jul 2019 11:26:47 +0200) 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: 209.51.188.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:163830 Archived-At: > From: martin rudalics > Date: Sat, 27 Jul 2019 11:26:47 +0200 > > I tried to address this problem in the attached patch. Tested with > GTK, Lucid, Motif and Windows builds. Since my GNUstep Emacs is > currently broken, somebody please verify that it does something > reasonable (if anything at all) on MacOS. Otherwise, I'd need help > from people working there. > > The patch should also fix the mouse drag and drop region vs. mouse > avoidance mode problem. Please someone verify that it does TRT now. Thanks, a few minor comments below. > + /* If forced to complete the update, no input is pending or we are > + tracking the mouse do the update. */ Commas missing here. Should be /* If forced to complete the update, no input is pending, or we are tracking the mouse, do the update. */ > - /* If this event is on a different frame, return a switch-frame this > - time, and leave the event in the queue for next time. */ > + /* If this event is on a different frame, return a > + switch-frame this time and leave the event in the queue A comma missing before "and". > @@ -3995,7 +3992,7 @@ kbd_buffer_get_event (KBOARD **kbp, > } > } > /* Try generating a mouse motion event. */ > - else if (!NILP (do_mouse_tracking) && some_mouse_moved ()) > + else if (some_mouse_moved ()) Can't we have mouse motion events outside track-mouse? > + DEFVAR_LISP ("track-mouse", track_mouse, > + doc: /* Non-nil means generate motion events for mouse motion. > +The sepecial values 'dragging' and 'dropping' assert that the moue ^^^^^^^^ ^^^^ Typos. Also, the quoting in doc strings should be `like this'. > + /* While dropping use the last mouse frame only if there is no > + currently focused frame. */ A comma missing before "use". There's too much of whitespace changes in the rest of the patch, making it very hard to review. Can you show the patch without whitespace differences? Thanks.