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#66655: 29.1; Clicking buttons sometimes doesn't work Date: Wed, 25 Oct 2023 19:45:59 +0300 Message-ID: <83h6meiraw.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22496"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomasralph2000@gmail.com, 66655@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 25 18:46:54 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 1qvh1x-0005Yh-IT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Oct 2023 18:46:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvh1f-0001Kr-Dh; Wed, 25 Oct 2023 12:46:35 -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 1qvh1c-0001KM-Nq for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 12:46: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 1qvh1c-0004RX-Dg for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 12:46:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvh26-0004vw-F4 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 12:47: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, 25 Oct 2023 16:47: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.169825239118914 (code B ref 66655); Wed, 25 Oct 2023 16:47:02 +0000 Original-Received: (at 66655) by debbugs.gnu.org; 25 Oct 2023 16:46:31 +0000 Original-Received: from localhost ([127.0.0.1]:59918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvh1a-0004uz-UD for submit@debbugs.gnu.org; Wed, 25 Oct 2023 12:46:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvh1Z-0004ul-7d for 66655@debbugs.gnu.org; Wed, 25 Oct 2023 12:46:30 -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 1qvh0y-0004Ia-UT; Wed, 25 Oct 2023 12:45:52 -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=oxanXSJJoQCtHlZEMo9O/xxmXDdou+Lh/G/TZJuyXtc=; b=WAQkd3TJvdzY Hv/BEH9NQ2AlBw83oqkXHLxNw47xWR1+S3MrE8w4BNT+DtKda5cROOZXVikwnIsqpvz+MHAG9KkFU +4HvZdyK9pQpQxl1UyWS4xugilayEChL5GU7W67OppOw7xOx0oYUF0ezzbjFOy/InCAh7SimWGBLw ZCHm0iEmmq4Q2Kr9KdHpv/Y/Jk4Mw+AIHDTwA6ifA0bxO/naCfPpf75ovWEHVyEayYZEho+cG4axH Qjdkb288iS0BKuiUkhBbkd2TLXJu/tJicNEIV9IRIPAG9x2Mtcr8U6Ot0I4tw0FTztSzhDdGP3xru RWa8ruVcTCMbnh+DVg/rDQ==; In-Reply-To: (message from Stefan Monnier on Wed, 25 Oct 2023 12:36:00 -0400) 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:273202 Archived-At: > From: Stefan Monnier > Cc: tomasralph2000@gmail.com, 66655@debbugs.gnu.org > Date: Wed, 25 Oct 2023 12:36:00 -0400 > > if (mouse_has_moved > && (!EQ (Fcar (Fcdr (start_pos)), > Fcar (Fcdr (position)))) > && EQ (Fcar (start_pos), Fcar (position))) > > The main purpose of the change is to address the "FIXME" in the comment: > if the mouse hasn't moved, I don't think we should generate a `drag` > even if the buffer content under the mouse has changed. 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. > So, IIUC, what you were saying is that with the new code, a small > movement that goes from one buffer position to another both of which are > within the fuzz will be considered as a click whereas with the current > code it will be a `drag`. Maybe that's worse than the "FIXME" issue it > tries to address? > > 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.