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: Wed, 20 Mar 2024 18:43:11 +0200 Message-ID: <86sf0k3lcw.fsf@gnu.org> References: <87zfutaram.fsf@t-online.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26942"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69915@debbugs.gnu.org To: Olaf Rogalsky , Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 20 17:44:50 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 1rmz3Z-0006ld-Hq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Mar 2024 17:44:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmz3I-0006ow-NR; Wed, 20 Mar 2024 12:44:32 -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 1rmz39-0006mz-26 for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2024 12:44:24 -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 1rmz38-0000aA-Qh for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2024 12:44:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rmz3m-0001iv-2Z for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2024 12:45: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: Wed, 20 Mar 2024 16:45: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.17109530656561 (code B ref 69915); Wed, 20 Mar 2024 16:45:02 +0000 Original-Received: (at 69915) by debbugs.gnu.org; 20 Mar 2024 16:44:25 +0000 Original-Received: from localhost ([127.0.0.1]:49045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmz37-0001hh-GC for submit@debbugs.gnu.org; Wed, 20 Mar 2024 12:44:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmz32-0001hS-UW for 69915@debbugs.gnu.org; Wed, 20 Mar 2024 12:44:20 -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 1rmz2D-0000CX-4a; Wed, 20 Mar 2024 12:43:30 -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=3XGDXMz0uMJ3+NlEC3Gkil1Aa++Rgx56guUXzDnXpdw=; b=cC05t0kR0+eS B4jUBOU7Xir9y47NIHmYcS31SgTPKfbTgfBJ8pLG6M72YeUKa9mB4c056AxPo7oSPlMrjTlEBHT9Z 6VNon71s5uV2l6HLro7er9bYsA6RVcDcETKU8kPIr4kBhdCT4WeKjhHzcI+xMw0VgCQrYem1PLZPR N3RPTqIGxt2LA9zQ2LSB4+Z0U8uJ3HUWVOplIMljxf0RnzjzgLSZsOULDBrmrSPTuhABquSz7AL/S +jZX0fWoW8Crq7mlJ8cEFjwbXzWHtQm3KH3m4HG6gJWNDYMYXnwq82HtBHrEY2VBi+4lFK/X/cMuR 1Qdqjv05ocMThyC22rbSKA==; In-Reply-To: <87zfutaram.fsf@t-online.de> (message from Olaf Rogalsky on Wed, 20 Mar 2024 15:29:33 +0100) 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:281868 Archived-At: > From: Olaf Rogalsky > Date: Wed, 20 Mar 2024 15:29:33 +0100 > > when using emacs in the terminal, the mouse-autoselect-window variable > has no effect, i.e. moving the mouse from one window to the next does > not change the selected window. > > Recipe: > --- snip --- > emacs -nw > M-: (xterm-mouse-mode 1) > M-: (setq mouse-autoselect-window t) > C-x 2 > >> > > --- snap --- > > The reason is, that xt-mouse.el does not generate > events. The following patch fixes that. Thanks. > To this end, it also fixes a bug in "window.el". Here, the > event which is added to `last-input-event', does not > contain a propper posn field. In X11, this works fine, but in the > terminal it results in a "nil is undefined" error. On an MS-Windows terminal I don't see this problem, so maybe there's more here than meets the eye? Anyway, why do you call posn-at-point with first argument nil? I don't think the position of point in that window is at all relevant, is it? Should we perhaps use the position derived from mouse-position instead? Jared, any comments to this patch?