From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69915: 30.0.50; mouse-autoselect-window has no effect in terminal Date: Mon, 01 Apr 2024 14:40:29 +0300 Message-ID: <86zfud9uqa.fsf@gnu.org> References: <86v856hon0.fsf@gnu.org> <00f0925f3a878950933691973fecd536@finder.org> <86frw6bww3.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33099"; mail-complaints-to="usenet@ciao.gmane.io" Cc: olaf.rogalsky@gmail.com, 69915@debbugs.gnu.org, jared@finder.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 13:42:34 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 1rrG3d-0008R8-6z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 13:42:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrG37-0003BT-Qd; Mon, 01 Apr 2024 07:42:01 -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 1rrG35-0003BD-IR for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 07:41: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 1rrG35-0006Kn-2y for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 07:41:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrG38-00028G-4N for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 07:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2024 11:42: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.17119716657939 (code B ref 69915); Mon, 01 Apr 2024 11:42:02 +0000 Original-Received: (at 69915) by debbugs.gnu.org; 1 Apr 2024 11:41:05 +0000 Original-Received: from localhost ([127.0.0.1]:49748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrG2C-00023y-Og for submit@debbugs.gnu.org; Mon, 01 Apr 2024 07:41:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrG2A-00023E-8v for 69915@debbugs.gnu.org; Mon, 01 Apr 2024 07:41:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrG20-000651-Nr; Mon, 01 Apr 2024 07:40:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ItVUrhMtqQBnHMy2FYKgFwbOldnaUR8Q06MMhfAtNQI=; b=YcYk2khV3f9S MMy0Yish0JLEh4AV+5+GPw63OAjQ7rHAeBotzoCUbmTePjYuZaaqJZK4QhTYnd6zIha7z5/2s3DhQ jufvOYXAvscWeFKeWiqDRZX9AKfiXypA563aD2IIsPRJGxIxKp6VsHYv7JvExUzpIYWE7N8NgDsk4 /N3JUAcBXjRcAqVsKi3V9JnrydlN26Y/9Pagpf2bwFV3BSX86CtxxVJm732Qi5DqoG1vbNEoAfE4m Obt0S8P1zJZMHMUMolWfSa1ZxL5bvhCSmyAXuNOkm0mGRGqyHHra3ut3DlZgO7nA2Tz3N5SgRXjPg tR+QduR7otgf5zLjEyVzvg==; In-Reply-To: (message from martin rudalics on Mon, 1 Apr 2024 11:09:47 +0200) 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:282468 Archived-At: > 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.