From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69915: 30.0.50; mouse-autoselect-window has no effect in terminal Date: Thu, 21 Mar 2024 10:00:51 -0700 Message-ID: <339ee67827867e0ec87bdbb1ba46415e@finder.org> References: <87zfutaram.fsf@t-online.de> <86sf0k3lcw.fsf@gnu.org> <87v85gbwcd.fsf@t-online.de> Reply-To: Jared Finder Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39664"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69915@debbugs.gnu.org, Eli Zaretskii To: Olaf Rogalsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 21 18:01:52 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rnLna-000A7m-F2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Mar 2024 18:01:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnLnL-0007Hb-Rx; Thu, 21 Mar 2024 13:01:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnLn9-0007F5-4S for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2024 13:01:23 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rnLn8-0003R0-Gy for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2024 13:01:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnLnm-0001eX-D1 for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2024 13:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jared Finder Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Mar 2024 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69915 X-GNU-PR-Package: emacs Original-Received: via spool by 69915-submit@debbugs.gnu.org id=B69915.17110404946257 (code B ref 69915); Thu, 21 Mar 2024 17:02:02 +0000 Original-Received: (at 69915) by debbugs.gnu.org; 21 Mar 2024 17:01:34 +0000 Original-Received: from localhost ([127.0.0.1]:44647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnLnK-0001cq-8f for submit@debbugs.gnu.org; Thu, 21 Mar 2024 13:01:34 -0400 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:48144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnLnI-0001ci-Vr for 69915@debbugs.gnu.org; Thu, 21 Mar 2024 13:01:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1711040451; bh=/nbp6cqDbSUnRZvsFlewvZ5OXnZznK3Zc4SG2SOjWTg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=S9dg+biMP0/vBydSeqfHTtGzPBFOdPswGvBNwemOgHVZO2Cp59i3NBUDsB64HYPrZ oMPa9/PpLd1NsyrDg0LS1ejN39k7K0zfh09K/rOK/dfUhrIDgh3n+Mg6/Feq3DEXNb HLc7VoTu76mbsLHyvoR2b9ub590bgF4Dehc9Z5C0zMVGxoV1aHYVf4lXICPCHK7RQv rlS2cjo5pEJ0q0fC+0ag9jLzjNLg83i/2wLdPpUa1d1y1J7lyy7WBQYGYK8RtwkhF1 0d1z2sEduyB7rvV5kgimjTEQu8q3HXnRME05pDDD/N+8wwMfDmkWxR6SE3m+6YvP0g PW/l806WVg3xw== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id DF980881; Thu, 21 Mar 2024 17:00:51 +0000 (UTC) In-Reply-To: <87v85gbwcd.fsf@t-online.de> X-Sender: jared@finder.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281910 Archived-At: On 2024-03-20 11:10, Olaf Rogalsky wrote: >> On an MS-Windows terminal I don't see this problem, so maybe there's >> more here than meets the eye? > Yes, same in X11. I wasn't able to track it down. Maybe it is burried > deep inside of "read_char". I tried this change locally on master without the change to window.el and everything worked fine for me. Are you certain you need the change to window.el as well? I'd be very surprised if it is necessary to change the structure of the event to get autoselect to work. My repro was just: src/emacs -nw -Q M-x xterm-mouse-mode M-x set-variable RET mouse-autoselect-window RET t C-x 2 C-x 3 Then moving the mouse between the three visible windows. Is your setup is different somehow? A few other pieces of feedback (you may find it easier to generate the events in xterm-mouse-translate-1 to address): events shouldn't be generated while the mouse is being dragged. This probably is reflected in fully by track-mouse, but I'd suggest looking at the native code that generates the event to confirm. If there is a case where two events should be generated (not sure if this case exists depending on above), we'd want to return both, but you can only return a single key sequence from the translate function. I think this case deserves a FIXME note. Did you try out switching frames? I'm not certain if is supposed to be generated when the frame is switched. Please name the new internal state variable with prefix "xt-mouse--". -- MJF