From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#48409: Text runs away before user can copy it Date: Wed, 19 May 2021 15:49:50 +0000 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> <831ra2rkgc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10994"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48409@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 19 17:50:32 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 1ljOSt-0002gW-HJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 May 2021 17:50:31 +0200 Original-Received: from localhost ([::1]:36454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljOSs-0001nj-K0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 May 2021 11:50:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljOSQ-0001nX-V7 for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 11:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ljOSQ-0005ql-O1 for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 11:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ljOSQ-0007Q5-Lt for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 11:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 May 2021 15:50: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.162143939928508 (code B ref 48409); Wed, 19 May 2021 15:50:02 +0000 Original-Received: (at 48409) by debbugs.gnu.org; 19 May 2021 15:49:59 +0000 Original-Received: from localhost ([127.0.0.1]:60500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljOSN-0007Pk-HR for submit@debbugs.gnu.org; Wed, 19 May 2021 11:49:59 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:26977 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ljOSL-0007PU-VH for 48409@debbugs.gnu.org; Wed, 19 May 2021 11:49:58 -0400 Original-Received: (qmail 93540 invoked by uid 3782); 19 May 2021 15:49:51 -0000 Original-Received: from acm.muc.de (p4fe15999.dip0.t-ipconnect.de [79.225.89.153]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 19 May 2021 17:49:50 +0200 Original-Received: (qmail 7488 invoked by uid 1000); 19 May 2021 15:49:50 -0000 Content-Disposition: inline In-Reply-To: <831ra2rkgc.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:206898 Archived-At: Hello, Eli. On Wed, May 19, 2021 at 15:12:35 +0300, Eli Zaretskii wrote: > > Date: Tue, 18 May 2021 20:23:55 +0000 > > Cc: juri@linkov.net, 48409@debbugs.gnu.org, acm@muc.de > > From: Alan Mackenzie > > (i) A down-mouse event occurs in the miniwindow: > > o - the mouse position relative to the top of the two-line miniwindow > > is stored somewhere. > > o - redisplay (or something) changes the two-line miniwindow into a > > one-line miniwindow. > > (ii) The up-mouse event occurs in the same place: > > o - the mouse position is determined RELATIVE TO THE NEWLY SIZED > > MINIWINDOW. > > o - The y coordinate is significantly different from that of the > > stored mouse position. > > o - Due to this difference, make_lispy_event thinks the mouse has > > moved, so returns a drag event. > > 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. > > 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. > You could simply recalculate the position to be frame-relative, and if > so, invoke the click-event binding. Right? Yes, that should work. The Lisp function window-edges, with appropriate arguments, appears to do what we need. I'll try that, and see if it works. -- Alan Mackenzie (Nuremberg, Germany).