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, 28 Mar 2024 07:41:28 -0700 Message-ID: <00f0925f3a878950933691973fecd536@finder.org> References: <86v856hon0.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="19620"; mail-complaints-to="usenet@ciao.gmane.io" Cc: olaf.rogalsky@gmail.com, 69915@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 15:42:35 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 1rpqxd-0004tA-T7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 15:42:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpqxA-0003qT-9h; Thu, 28 Mar 2024 10:42:04 -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 1rpqx8-0003pu-Ah for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 10:42:02 -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 1rpqx8-0003ec-2J for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 10:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpqx8-0006yK-Fc for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 10:42: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, 28 Mar 2024 14: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.171163689426627 (code B ref 69915); Thu, 28 Mar 2024 14:42:02 +0000 Original-Received: (at 69915) by debbugs.gnu.org; 28 Mar 2024 14:41:34 +0000 Original-Received: from localhost ([127.0.0.1]:40905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpqwf-0006vP-UM for submit@debbugs.gnu.org; Thu, 28 Mar 2024 10:41:34 -0400 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:50150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpqwc-0006uo-Mu for 69915@debbugs.gnu.org; Thu, 28 Mar 2024 10:41:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1711636889; bh=m7P5ukUuZxYIrt+KjaKzUl8uAnNju5JHO5FknvFFoCI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i+ip8WRqE0deSLnNuVF4Gk4BmQRv0Bw42J0PtdIhSXZMu1EjZq6TaJAwsmKaXVVow zhtVSBp/+Lgnjda9ZPJ08R+d3WlJpWlWfW1VrEpXWfg5wnSuNrYsf2/ctB8vQozwYR fBVIjz5zVGsYTXIH4vuAjpfQD6g7kAgK3CSg/NRsZ4O3sAHM39yDsjJNpaosTx3X2H 8a/5utg5C24KGLI2V2/pTR+gNJyOdL54OMA2985G1EL1w/k5tQZgO83bSi17L/KXlC UA/5zW8dXlfAqzIlpkQzPRyhWokEdfYPCoUizhV2bU+22za0w2eXPJLflle8tfY/HK zQCglIUjf84PA== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id F009760A; Thu, 28 Mar 2024 14:41:28 +0000 (UTC) In-Reply-To: <86v856hon0.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:282233 Archived-At: On 2024-03-27 23:11, Eli Zaretskii wrote: >> Date: Wed, 27 Mar 2024 14:47:27 -0700 >> From: Jared Finder >> Cc: eliz@gnu.org, 69915@debbugs.gnu.org >> >> > On the other hand, looking at msdos.c, there is no test against >> > the minibuffer. I believed, that the selection of the minibuffer >> > is taken care of at +10638 of window.el. In my tests the patch >> > behaves exactly like the documentation, quote: "Mouse >> > auto-selection selects the minibuffer window only if it is active, >> > and never deselects the active minibuffer window." I added the >> > test, but commented it out. >> >> I'm not sure what the right way to proceed here is then. Eli, can you >> give advice? >> >> Looking at different OS files that handle mouse_autoselect_window, I >> see >> the following state for checks if the selected window is a minibuffer >> with MINI_WINDOW_P: >> >> pgtkterm.c: checks >> w32term.c: does NOT check >> w32inevt.c: does NOT check >> nsterm.m: checks >> xterm.c: checks >> msdos.c: does NOT check >> haikuterm.c: checks >> androidterm.c: checks >> term.c: no support for mouse-autoselect-window. :( >> >> My gut is to assume that the X and GTK behavior is most likely to be >> better tested and more correct, but I defer to Eli here. > > I tend to agree. But, just to be sure, can you or Olaf describe the > exact issue and how it could happen, and perhaps show a recipe to try > reproducing it? I'd like to take a closer look at the relevant code. 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? -- MJF