From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Disabling mouse input Date: Mon, 04 Nov 2024 17:48:17 +0800 Message-ID: <87ses7jpni.fsf@yahoo.com> References: <86sesaytjn.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="32826"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Daniel Radetsky , Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 04 10:49:23 2024 Return-path: Envelope-to: ged-emacs-devel@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 1t7ti6-0008LO-U4 for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Nov 2024 10:49:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7thM-000102-O1; Mon, 04 Nov 2024 04:48:37 -0500 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 1t7thK-0000zj-EN for emacs-devel@gnu.org; Mon, 04 Nov 2024 04:48:34 -0500 Original-Received: from sonic305-20.consmr.mail.ne1.yahoo.com ([66.163.185.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7thI-0001ci-Aj for emacs-devel@gnu.org; Mon, 04 Nov 2024 04:48:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1730713709; bh=DyQ9xAtSnwSjpwrdH1k2aJkzCwgspkQpRJyolbkQdYY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=jcQZsdy5I/2PUfzXWjaLrdJNUrU1QZAdm7yPjSgU0AivRt9b7C29tNfMjMzKjhfNajDTGc1TI08mBhaWzMYcggVqmOaF5STYKV3PyGHw+Y4DWU+DTDmY2x5CJn2yPCpcapsI52ZsIiVvzcyWC0XErsvvEcDEVvWDkt9wxcyBttVdHgIgcikBizTWpvA1WXHUwlJdGYU8DQmpdtFwYjtk9jzdHPau1kuMyxrFJ+jTbWd08ZmxHt1n1NMDz4z0hvqMHlG6FQs+0wJ09IP25eWPB2UO6Ep9NLaBJlt+VXiGmLnHA5EBhQzymsu0Y9SEQ9SEGPwqmKW1aQqCFYtNoHVWVw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1730713709; bh=fUN1Z1FZvGcj2tDa9EGhtTMYEGaFvKh9lfWb1FJTQkC=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=plFB6s0vZI0AFUNtQHQKPo109b9OpuIIdsbOaDnuaPGIy0v8KmejJd9BWSmlHOBjRV/aVP7ovh+ZDthT8SxYZPKpBI4ZoOAiMAYI86xnEY2eU9uSgJXfGasgLgmN86b8prR+hnlbo/XVRYwJtGXymmQITVqeWbDMoVwA8oIeoebchJlfz32PypUxN7JyWXBldKbhjJtyGrbBTbTKAAjgpSlLX+3+L93WadX4wsUCmnDuLjdYXv/4dPZfOzfGEgWOBDKWxrc1sM9nYM+STVcPuQQgVmpulgL6Aq6l6Tb7FPDS5B5x9a/6RyhGbRJW/A55ovjr70Tv+ocsVeuAgPAxJQ== X-YMail-OSG: JoTByKgVM1l.kCtnSNtK6iJXAM4jwpZrJ.FDc5yQmy4bVJzFRZpChMeVqEVPjuK RkWFm_jHKSsTzS16Ral1BE_Ji.eOZfWB7SOU6UcNQWvFfSHnH_LWxpL354i3oyxGK1g2NNn65eSv 6cAoagt.T65cyt25dMhMWqr2R.fptZfwZ.HI4_rRM7oTvu6SFkjloMlcH3UG7qKSf1Z0sPvcS4Ms oDM7rIl_FBJG3_L0JskzaHZz0kCnSPCMxGHGrmTXC08D4_0xwu7oLCfeITnxTlokewWIKAQVTFOp 0IyerWeWrdh1HQ6JEAY34RX2N1VEGQ0D_nwAIMtWy3PLkKRlTGrr7f.o9PSkEYhefw7ym_mmVjN9 5XkmG8OYqeZaZIs21xS7Ukp1VIohLbrbkTDjDdx2LiSpSjaxAJq9T.2mbZPxQ.UE3eYCCLeQCCgJ 4wjMfjSGsmFrgqz6V9MghFPX_d7c1EXIEHGKdIvRzmu0eqq3SoTjiSc6Qc4eLe.9yLivHZ9keLGQ gclByGY2WZnrEPUxncqawKnq4sIm_O_nSd9HoBX1pNaE4edZ.e4G5AsTuNoGJd29J.auG4KvkBxu J2z9AYCLV.L.Oyd2imMMsQq425tlwEmqiXOMA9oMiuxajVS4wkiUcl0EfX1C1XxT57Lv7xRovxAC OTAPoea1q2GG5HReFU3DD1X9AeCY8OTonl98HOKC.Yroo5S3vGJvc0J6TBO5DK5i3bf2xU4Wewkr HUUarQHhpexRqHj5WIb7qoUDahLKrT1sBtkAOG3rljZAtvuh_e.HaLC5J7bxtlIgaBYZ9nrZhTF9 jHxPi2iGjeBty65jcvaqJOUPjzWohuYss_tuwF5OdK X-Sonic-MF: X-Sonic-ID: f159b3e7-9d45-4ec1-b63a-e9dcaf116aa8 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Mon, 4 Nov 2024 09:48:29 +0000 Original-Received: by hermes--production-sg3-5b7954b588-zm2md (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID fc7e961d7e197316db18d792cd9453f6; Mon, 04 Nov 2024 09:48:22 +0000 (UTC) In-Reply-To: <86sesaytjn.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Nov 2024 09:38:20 +0200") X-Mailer: WebService/1.1.22806 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.185.146; envelope-from=luangruo@yahoo.com; helo=sonic305-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325086 Archived-At: Eli Zaretskii writes: > Thanks, but this is not enough, and I also think it doesn't > necessarily ignore the mouse events on the right level. We should > instead ignore these events where they are read, here: > > /* No need for FIONREAD or fcntl; just say don't wait. */ > while ((nr = (*t->read_socket_hook) (t, &hold_quit)) > 0) > nread += nr; > > This loop should ignore and remove from the queue any events whose > 'kind' (as declared in termhooks.h) is a mouse or touchpad event. And > perhaps we also should allow ignoring the latter, but not the former. > Otherwise, the "ignored" input events will act like ghosts: they do > exist in the queue, and do trigger input-even related mechanisms we > have, such as while-no-input, but cannot be accessed. > > Stefan, Po Lu (and others), do you agree? I agree, and it's probably also a good idea to abort any key sequence involving down-mouse-1 events if this option should be enabled during them. > In addition, we'd need to change display-mouse-p, so that it reflects > the fact that mouse clicks are not available. Otherwise, some > features will present mouse-driven UI that cannot be used. Though I confess to not having read enough of this conversation to understand why this option is useful. Surely it must be more difficult to control Emacs with one input device than with two.