From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#48409: Text runs away before user can copy it Date: Wed, 19 May 2021 19:40:06 +0200 Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------D3DD735A746CAA41B7824F60" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25425"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48409@debbugs.gnu.org, juri@linkov.net To: Alan Mackenzie , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 19 19:41:12 2021 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 1ljQBz-0006TH-LJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 May 2021 19:41:11 +0200 Original-Received: from localhost ([::1]:34326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljQBy-0005n5-NR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 May 2021 13:41:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljQBq-0005mt-IV for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 13:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ljQBq-0002zw-Ag for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 13:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ljQBq-00029n-8t for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 13:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 May 2021 17:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48409 X-GNU-PR-Package: emacs Original-Received: via spool by 48409-submit@debbugs.gnu.org id=B48409.16214460208231 (code B ref 48409); Wed, 19 May 2021 17:41:02 +0000 Original-Received: (at 48409) by debbugs.gnu.org; 19 May 2021 17:40:20 +0000 Original-Received: from localhost ([127.0.0.1]:60629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljQBA-00028h-2x for submit@debbugs.gnu.org; Wed, 19 May 2021 13:40:20 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:33685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljQB7-00028Q-Uu for 48409@debbugs.gnu.org; Wed, 19 May 2021 13:40:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621446009; bh=H1Y/qtkjesMcaAg9CjE0LnEPnL3wMCatArNhBBL6Oik=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=EEm9vGDHaLmKxjUs6AUq/tF7wEZZT0TmfyJ181+N9rmSksdJg9W9cexrwwuT/Nts3 GHD5C7B8Cbg5iUOYQicwJ5YqhdvLQwF96bNqBLmn5MAJl/ZeF7/gnwOnLjeEIRiXPQ /Zy7hH1o8FnGeTAlx0aDQdvZRD08xme/cCpCGacE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.159]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1McH5Q-1lBRrx1ZbI-00cinz; Wed, 19 May 2021 19:40:09 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:+mQQwymJGpqZy8E+gJjXEzuZEux5tIuZvevXKZ9RSCW2+Ol5eTn H0EWXGbZj9MUAzM2Eiermm0koAjTkPAYNQkqAC7dBHHZIakM/sftUYexmXrXVU5+F9aNmzY ZSEMRDVMKXU43DQAq7lNAgLs6HaccSLScHdm8YezaxLKCyeCJ1gyjRcHL973tpDmGrPlRA7 B+lm3hFu3gaBQQrJOEQ1A== X-UI-Out-Filterresults: notjunk:1;V03:K0:W4kfwvA03Zw=:MDjR6nZLCqIQD1HcU4KjfG oWfs/pqUuwCiCNkcAXqiocZVkYwfo+yQKu3iSfN6YeSZlxRvIouqyLBTAWvVCDMtc8r8np1og cvcw8DRkP1mGasFDXmIN4Lz4N6/bsFg7S5h9cbHwABrtSo0ABVXFkRu8YiFQ+Z1xc4zI6KJji pqJeDSyY3kvx0s0MblaHial5GEusivCY85TQjq4yZ9bGF3Xa/BcINBbCxyg/T2WUPRS1HEeGd YLHqxy2tx6CsRcYc1Sx7g4yi/7PTLt/EC3+MrkHUB/CWvmN7lTZ4pPBwR0jTQy4zxf1a7MpKu md+Tl4DsPkIfAgPiUzJju1SForRcUTY5HlIYJLyCvGzYaK2HZwgyKFABCt4ohhhi+uzdmX/zx tpKg4ut5RhM0zHodflKhZmspSYbV0o9xzMRvWIIPvjQyNfziafaHCfGJsl7gn6w5ze0dZcKlF MSHgYem9dJh6vA+DQhtlATHOPVAf1CiyYrLdY+Gre2//b/prt4NlFgQzVBRcdeGIkktd9vSYO trI5zxT9asn6Q9A5ZDHkVQKdB3ZLcDuShvghC167Dr7zE53sznJatQOWrJy6MXUyzk+L1keRc IIpVrcpo3mLByxZYf4UFQHbMXGYyWMYOc6AKYixbKuJeqg5aFLyih6nqpztwJTmyMyaZuEKqw xk0xy7gh24Y2eRBtFjLtArv4MuEJiH1Cfa8winsLNhQtgpCnoEeOCzS9TONzND4J76gEnaN4Y 79Jya9G6xKt+MXO+/cINiM4PuljwYInhCKKE7G6J3N0TWTUyGC49PRVFWLvsePOjSbAfyMch 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" Xref: news.gmane.io gmane.emacs.bugs:206910 Archived-At: This is a multi-part message in MIME format. --------------D3DD735A746CAA41B7824F60 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > The above is the basic scenario. If the mouse is on the top line of the > miniwindow when the mouse is clicked, the returned y coordinate at (ii) > is in the mode line of the window above, and is determined relative to > that window. Are you sure? If the click happens on the bottom line, it's still here reported for the minibuffer window only that now the double click fuzz rigmarole breaks in and says that the mouse has moved. > I don't have any workable ideas on how to fix this bug. The only idea > which springs to mind is to move from expressing mouse positions > relative to a window to expressing it relative to a frame. Or, maybe > the resizing of the miniwindow could be postponed till after the > up-mouse event. For clicks into the bottom line the attached might help. Clicks above must be caught elsewhere. But you don't get a drag event and no error message for them. martin --------------D3DD735A746CAA41B7824F60 Content-Type: text/x-patch; name="keyboard.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="keyboard.c.diff" diff --git a/src/keyboard.c b/src/keyboard.c index 47b5e59024..2aa47b57fa 100644 =2D-- a/src/keyboard.c +++ b/src/keyboard.c @@ -5727,9 +5727,21 @@ make_lispy_event (struct input_event *event) it's probably OK to ignore it as well. */ && EQ (Fcar (Fcdr (start_pos)), Fcar (Fcdr (position))))) { - /* Mouse has moved enough. */ - button_down_time =3D 0; - click_or_drag_modifier =3D drag_modifier; + Lisp_Object pos_window =3D XCAR (position); + + if (EQ (XCAR (start_pos), pos_window) + && (!WINDOW_LIVE_P (pos_window) + /* Make sure down has still valid coordinates + within position's window. */ + || ((XWINDOW (pos_window)->pixel_height + >=3D XFIXNUM (XCDR (down))) + && (XWINDOW (pos_window)->pixel_width + >=3D XFIXNUM (XCAR (down)))))) + /* Mouse has moved enough. */ + { + button_down_time =3D 0; + click_or_drag_modifier =3D drag_modifier; + } } } --------------D3DD735A746CAA41B7824F60--