From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Olaf Rogalsky Newsgroups: gmane.emacs.bugs Subject: bug#69915: 30.0.50; mouse-autoselect-window has no effect in terminal Date: Wed, 20 Mar 2024 19:10:53 +0100 Message-ID: <87v85gbwcd.fsf@t-online.de> References: <87zfutaram.fsf@t-online.de> <86sf0k3lcw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28136"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.11; emacs 30.0.50 Cc: 69915@debbugs.gnu.org, Jared Finder To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 20 19:55:47 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 1rn16I-00072u-W3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Mar 2024 19:55:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rn15x-0006SC-Og; Wed, 20 Mar 2024 14:55:27 -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 1rn15u-0006RZ-MR for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2024 14:55:22 -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 1rn15u-0000Oq-D4 for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2024 14:55:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rn16X-0005HR-RB for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2024 14:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Olaf Rogalsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Mar 2024 18:56: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.171096092220192 (code B ref 69915); Wed, 20 Mar 2024 18:56:01 +0000 Original-Received: (at 69915) by debbugs.gnu.org; 20 Mar 2024 18:55:22 +0000 Original-Received: from localhost ([127.0.0.1]:56636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rn15t-0005FY-2n for submit@debbugs.gnu.org; Wed, 20 Mar 2024 14:55:22 -0400 Original-Received: from mailout05.t-online.de ([194.25.134.82]:36336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rn0vC-0001so-76 for 69915@debbugs.gnu.org; Wed, 20 Mar 2024 14:44:20 -0400 Original-Received: from fwd87.aul.t-online.de (fwd87.aul.t-online.de [10.223.144.113]) by mailout05.t-online.de (Postfix) with SMTP id 21E379911; Wed, 20 Mar 2024 19:18:43 +0100 (CET) Original-Received: from blaubaer ([46.5.3.3]) by fwd87.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1rn0WQ-2JvB2n0; Wed, 20 Mar 2024 19:18:42 +0100 In-reply-to: <86sf0k3lcw.fsf@gnu.org> X-TOI-EXPURGATEID: 150726::1710958722-87FFC968-FD343095/0/0 CLEAN NORMAL X-TOI-MSGID: 856ef732-c8b6-457e-a9c9-1bae624bed59 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:281874 Archived-At: > On an MS-Windows terminal I don't see this problem, so maybe there's > more here than meets the eye? Yes, same in X11. I wasn't able to track it down. Maybe it is burried deep inside of "read_char". > Anyway, why do you call posn-at-point with first argument nil? I Because I was lazy and didn't thought, that "the position of point in that window is at all relevant". Eli Zaretskii writes: >> 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? -- Olaf Rogalsky Schwoerhausgasse 5 89073 Ulm Germany