From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66655: 29.1; Clicking buttons sometimes doesn't work Date: Wed, 25 Oct 2023 13:27:31 -0400 Message-ID: References: <1d9187b71e7288eaf08ac9a2f0559bdf@gmail.com> <8334y4s0oe.fsf@gnu.org> <83v8axmbsh.fsf@gnu.org> <83y1fskyjj.fsf@gnu.org> <83il6wktxt.fsf@gnu.org> <83h6mgkst3.fsf@gnu.org> <83edhkkrzd.fsf@gnu.org> <83bkcokoxu.fsf@gnu.org> <83pm12kj44.fsf@gnu.org> <83msw6it17.fsf@gnu.org> <83h6meiraw.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15902"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: tomasralph2000@gmail.com, 66655@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 25 19:31:07 2023 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 1qvhik-0003xj-KB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Oct 2023 19:31:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvhiI-0000Uo-Ar; Wed, 25 Oct 2023 13:30:39 -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 1qvhiD-0000Rc-3V for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 13:30:33 -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 1qvhiC-0003qG-Dp for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 13:30:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvhig-00069K-MN for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 13:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2023 17:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66655 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 66655-submit@debbugs.gnu.org id=B66655.169825502423559 (code B ref 66655); Wed, 25 Oct 2023 17:31:02 +0000 Original-Received: (at 66655) by debbugs.gnu.org; 25 Oct 2023 17:30:24 +0000 Original-Received: from localhost ([127.0.0.1]:59963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvhi4-00067v-4v for submit@debbugs.gnu.org; Wed, 25 Oct 2023 13:30:24 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvhi1-00067c-8H for 66655@debbugs.gnu.org; Wed, 25 Oct 2023 13:30:22 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3D7C810013E; Wed, 25 Oct 2023 13:29:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1698254979; bh=6x416gOYU1WVohseaqgcKue/TmjZmZexXFXSRMI7/gQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cgQVlXJQ6BFSFxkm3yEUxpgyKuQ/T8CRfIDaJVr0Ei8tIiUCR++/zLTAbq95dRmt5 dxXvdkHNs90mdQvg275L1iyixX9+tUsienbRQxaPsOFvnLXgyi43cHr4Icq2mEbfTH QURNMqx/qB6O4UwVQ+GNUxnZpIkM+BhBOrNnIDZYJgGbmM9NG7O5IUFfjin+UPl1kK iAiKk6bVWZrRQ8IaJOo/vqx5i96OSZbGIjiLQm1wxQ8ughfhpCJeKNEo99a0N0KTIJ ehhziBp+0gfrPwRLeZiLl6NrK8K9a9Zz2E1mxfeg9p7AJAoej2q4XNHSBw+msFcgng Y2K9Z7DXRnFBA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C818E10006B; Wed, 25 Oct 2023 13:29:39 -0400 (EDT) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BA68512107C; Wed, 25 Oct 2023 13:29:39 -0400 (EDT) In-Reply-To: <83h6meiraw.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Oct 2023 19:45:59 +0300") 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:273205 Archived-At: > But then we are back at the problem which the buffer-position check > tries to address: > > /* Maybe the mouse has moved a lot, caused scrolling, and > eventually ended up at the same screen position (but > not buffer position) in which case it is a drag, not > a click. */ > > IOW, just testing the screen coordinates is not enough. In my "in short is approximately" I used `mouse_has_moved` but that was an oversimplification: in the new code `mouse_has_moved` doesn't revert to "false" when the mouse returns to the original position, contrary to what happen in the current code. So, no we shouldn't suffer from this problem. >> The other part of the change is the handling of `EQ (Fcar (start_pos), >> Fcar (position))` and I must admit I don't know what to do with it, so >> this part of the change is largely arbitrary: I don't know why we >> currently check this condition nor why we only check it when mouse has >> not moved. > > I think the comment above explains that, or at least tries to. The comment above talks about buffer positions (i.e. the Fcar+Fcdr part of the positions), whereas this `EQ` tests the windows, and the only relevant comment I see is /* Different window */ which reminds the reader that it's comparing windows but doesn't say why. Did I miss something? Stefan