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: Mon, 01 Apr 2024 07:08:25 -0700 Message-ID: <4b7f7d0f711e2dc81c3ffffa8efb4714@finder.org> References: <86v856hon0.fsf@gnu.org> <00f0925f3a878950933691973fecd536@finder.org> <86frw6bww3.fsf@gnu.org> <86zfud9uqa.fsf@gnu.org> 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="13945"; mail-complaints-to="usenet@ciao.gmane.io" Cc: olaf.rogalsky@gmail.com, martin rudalics , 69915@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 16:09:16 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 1rrILb-0003O5-Jg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 16:09:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrILL-0000s7-PR; Mon, 01 Apr 2024 10:08:59 -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 1rrILL-0000rz-3W for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 10:08:59 -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 1rrILK-0004sw-RO for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 10:08:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrILN-0001V7-Kk for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 10:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jared Finder Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2024 14:09:01 +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.17119805125712 (code B ref 69915); Mon, 01 Apr 2024 14:09:01 +0000 Original-Received: (at 69915) by debbugs.gnu.org; 1 Apr 2024 14:08:32 +0000 Original-Received: from localhost ([127.0.0.1]:51313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrIKt-0001U3-Jv for submit@debbugs.gnu.org; Mon, 01 Apr 2024 10:08:32 -0400 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:47038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrIKr-0001Tw-HX for 69915@debbugs.gnu.org; Mon, 01 Apr 2024 10:08:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1711980505; bh=LPyJnS6ihWmKIfryw62+BiiKjOt8GgxQM0PuCAR4Naw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dxc+dyC2E3FTQGfB7ySUWKfn/kKIp5PFozpoeE05xBmUENdr8alshnXH+YohDNPNw 2aV2EiqkLqx1lwl5IbfpXGsqoNhoor+sZayKfp5AT4abw4acXvaIAptjwFavZrIM8E fc+HfxhQ5BlDSOQ0LYGGr6AAxzKM4P5lCI+HJxyNm0RDlcSlTRtUItdfQrFmqOe0Cu AAkEgEsz8D9mFhxnZQEq9mvFbRCw2eZPtWhMpjgDXKCtpa11cMsM/qdMfVaq6Sj0w3 5I2Pl5TC6SSZf/cme0gckYVNpj2nEInkA7CoOa5ZuyTKfRYOvp062DBKnA8PDwTWWW bJSYbEzFYBM6w== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id 51A9597D; Mon, 1 Apr 2024 14:08:25 +0000 (UTC) In-Reply-To: <86zfud9uqa.fsf@gnu.org> 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:282475 Archived-At: On 2024-04-01 04:40, Eli Zaretskii wrote: >> Date: Mon, 1 Apr 2024 11:09:47 +0200 >> Cc: olaf.rogalsky@gmail.com, 69915@debbugs.gnu.org >> From: martin rudalics >> >> > The mini-window test was added by Martin, AFAICT, as part of >> rewriting >> > the mouse-autoselect-window support. Martin, do you remember why >> you >> > added the MINI_WINDOW_P test in xterm.c, but not, for example, in >> > w32term.c? >> > >> > In any case, I couldn't find any problems with the current behavior >> on >> > MS-Windows when mouse-autoselect-window is non-nil. >> >> The original mini-window test was conceived by Stefan >> >> commit 66c226bf5a1e8289b0ce676d5e4225810a11af91 >> Author: Stefan Monnier >> Date: Thu Jan 20 14:23:23 2005 +0000 >> >> (handle-select-window): Don't switch window when we're in the >> minibuffer. >> >> and I moved it to xterm.c later. I don't remember why and all I >> remember is that the accompanying comment was not mine. >> >> The check is redundant because the condition is tested again here in >> 'handle-select-window': >> >> ;; Don't switch if window autoselection with mouse is >> active >> ;; and minibuffer window is selected. >> (and mouse-autoselect-window (window-minibuffer-p)) >> >> One could say that the xterm.c code is more efficient because it >> doesn't >> generate a SELECT_WINDOW_EVENT when the selected window is the >> minibuffer window. The w32 code generates the event but has it >> dismissed later in 'handle-select-window'. >> >> In either case I would not remove the check from >> 'handle-select-window' >> because that one is platform-independent so there's no need to >> implement >> anything separately in the backends. >> >> Though it might be more accurate to replace 'window-minibuffer-p' with >> 'minibuffer-window-active-p' to catch the case where a user, for some >> reason, selects the minibuffer window manually without activating the >> minibuffer. And the 'mouse-autoselect-window' conjunct above is >> likely >> redundant... > > Thanks. > > Jared and Olaf, so I think the minibuffer test in the patch should > stay, but please see Martin's suggestions above. Martin, did you mean we should change Olaf's patch to xt-mouse.el use minibuffer-window-active-p or we should change handle-select-window in window.el to use minibuffer-window-active-p? I have a preference to keep xt-mouse.el aligned with xterm.c as well as other native code checks, all which use MINI_WINDOW_P (window-minibuffer-p in Lisp) currently. -- MJF