From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics 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, 1 Apr 2024 11:09:47 +0200 Message-ID: References: <86v856hon0.fsf@gnu.org> <00f0925f3a878950933691973fecd536@finder.org> <86frw6bww3.fsf@gnu.org> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35042"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: olaf.rogalsky@gmail.com, 69915@debbugs.gnu.org To: Eli Zaretskii , Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 11:11:33 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 1rrDhV-0008zG-9N for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 11:11:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrDh2-0003au-Lr; Mon, 01 Apr 2024 05:11:05 -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 1rrDgy-0003ZH-Hy for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 05:11:01 -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 1rrDgx-0000gw-Ep for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 05:11:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrDh0-00035P-8H for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 05:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2024 09:11: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.171196260611787 (code B ref 69915); Mon, 01 Apr 2024 09:11:02 +0000 Original-Received: (at 69915) by debbugs.gnu.org; 1 Apr 2024 09:10:06 +0000 Original-Received: from localhost ([127.0.0.1]:49567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrDg6-000343-04 for submit@debbugs.gnu.org; Mon, 01 Apr 2024 05:10:06 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:32989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrDg3-00033S-Qf for 69915@debbugs.gnu.org; Mon, 01 Apr 2024 05:10:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1711962590; x=1712567390; i=rudalics@gmx.at; bh=ZSLSP1N8Ls2EYCcle7X+DLlbmATJeHwogaKOA4NaS6k=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=NC8ey05vvI2qXkRyaHpSTGsXhYf0f5Ah0I3nY4GLNl+4BZnAXAK+ZFbrG+fO1XFg o3qRUTzAaaSbuIDpvKFe1D2OHIaq4kd7XTfIT0ogWNR81yCi5fG869rnEd6tL0ngX 0wudeMxp7pplLAL9YHGGmPzchSgCU7KEV58vHLZpuOhloZJsMw9VoMe18779QFZzm SGwlK8JKquLYOSREL+nhhKwr7cqj8k2b/L9K9o9cmFa12rasT5tdaICIe70b+QdEX MCMWmEIGj0oY1uCZaJbxj5jhnyLYmQCGlq8u5HGBtG7dpJd1lVnxvFivFbulgYUZL pyrnqzU3M5+Xw+n+ww== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.163]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIwzA-1s5zdP3hJS-00KTZT; Mon, 01 Apr 2024 11:09:49 +0200 Content-Language: en-US In-Reply-To: <86frw6bww3.fsf@gnu.org> X-Provags-ID: V03:K1:oVmTH0ZJR12GH+d4iyGo+4jp+fv9pHEQN1U8wvpirFv7lzTXiLI MsKU85Ga9RHZ2GUFhqU+sSu/DHwExAOFK6/h1B4oSOo8Z2+ii56+A45o1fjKdmiT9rFIche +tHx1vdfQCReD5ybUinFhNUrSSnM9FYDlFHLAnak//B3CElpP0+8FWasuXrsS5gcopLw9HD VFgX8tDy2xQfKIwXhNgYg== UI-OutboundReport: notjunk:1;M01:P0:9pCSM82NRK8=;jkg2rRRjBP/1ig13j+yZpDMmM94 f19o4DiHQB/7XPQonbZYEJIFl8jE7pSyPXGp9l52zDFpqg76dpEJZMaZrILf5rkhAn4y4+hQV KrDJXou/6plvZKlaW7oDxnucu8XEwKz727JFUkdZq96IjcBKyiRMgPE2+5NP4USrcVgE80HTi llgH5MPOjyPJzTolnf4Cz4JpgWgLykNQFUkMJbBEmiWyQWp/0rOVKicmq0bSYsgAOypSrb7Pm Pk4ZBqq0S3VpOXL5tO7cpr5zKsxeVowzX33C9TyHppfmuEw9oC1yrC7QOro8Q5KgwYbo1gtKE apuYz7doaaDciyGlxqnCyVvh6TVCcNNXKSvQM1fWvEyGGKdPuprVdXAaf5nkZSrCwS1XFZp3C klkC+IorVHrYyfIPC6BScwv0wsvm51lQa4eoU8u6iBKMkGFmSrdsgVNmkt4C/i0QtekKeiBP+ mgAQLOWhQQPAl5ji2nSS1zTet54eHpeo82km6F9IXwPyzHF5vFCvWxF7G4sW/dzXYZFFV6yu7 StIeP8Qmx+yAB5qMSIItpb7hCE+b44SOKaJ86y4DrL9PW4tqUQOzkTFw6WUR+95OCbXiTLBDK /YHP6NMpmc46MgEyuv9AJVsgbOE7lPqCxI7dQX4igf7wrW+G+nI6SP7YYSTyhgV5zv1S8f+op 5mwarjMcvcL0dxFFRV0MQcnCbv62/e0jQ1w14w6XgdWJJ7YNM9Ve3J65Ly9WExJ1Gqbe3jAUo C+OQJNXs0uwOgV7YbX9AOIOu03v8uvDbcxtnC7iRzk68pIgXKB/tzpOKTigDbbo6G4yGKsr9 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:282460 Archived-At: >> The intended behavior is that is even with mouse-autoselect-window set, >> moving the mouse is never supposed to change the selected window away >> from the minibuffer. Many platforms explicitly check if the selected >> window is the minibuffer before emitting the event, but >> not all platforms do (see list above). >> >> And on all platforms, including ones without the explicit check we get >> the intended behavior from our testing. >> >> So my question is should we copy the explicit check to prevent >> events from being emitted to xt-mouse.el as well, even >> though it does not appear to be necessary from our testing? > > 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... martin