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#47581: 27.1; tab-bar missed mouse clicks on MS-Windows Date: Sun, 11 Apr 2021 12:24:09 +0300 Message-ID: <83fszx41ja.fsf@gnu.org> References: <83pmzbeajw.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19196"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47581@debbugs.gnu.org To: Ioannis Kappas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 11 11:25:17 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 1lVWLF-0004u5-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 11:25:17 +0200 Original-Received: from localhost ([::1]:36606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVWLE-0006Hj-F2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 05:25:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVWL0-0006HF-6y for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 05:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVWKz-0006C4-Ve for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 05:25:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lVWKz-0004gi-SW for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 05:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Apr 2021 09:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47581 X-GNU-PR-Package: emacs Original-Received: via spool by 47581-submit@debbugs.gnu.org id=B47581.161813307417978 (code B ref 47581); Sun, 11 Apr 2021 09:25:01 +0000 Original-Received: (at 47581) by debbugs.gnu.org; 11 Apr 2021 09:24:34 +0000 Original-Received: from localhost ([127.0.0.1]:54014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVWKX-0004fu-Pj for submit@debbugs.gnu.org; Sun, 11 Apr 2021 05:24:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVWKW-0004fi-Su for 47581@debbugs.gnu.org; Sun, 11 Apr 2021 05:24:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59134) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVWKR-0005pT-Nc; Sun, 11 Apr 2021 05:24:27 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2647 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lVWKR-0003hR-2U; Sun, 11 Apr 2021 05:24:27 -0400 In-Reply-To: (message from Ioannis Kappas on Sun, 4 Apr 2021 20:43:44 +0100) 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:203836 Archived-At: > From: Ioannis Kappas > Date: Sun, 4 Apr 2021 20:49:24 +0100 > Cc: juri@linkov.net, 47581@debbugs.gnu.org > > I think the actual problem is elsewhere: in handle_tab_bar_click. It > includes code that was copied from handle_tool_bar_click, and which > pays attention to the value of mouse-highlight. But tab-bar buttons > don't behave like tool-bar buttons in this regard: they don't respond > to moving the mouse pointer to them by "activating" the button. So I > think that code should be removed from handle_tab_bar_click. To wit: > turn mouse-highlight off (M-x set-variable RET mouse-highlight RET nil > RET), and clicks on tab-bar buttons miraculously start working with > 100% reliability. > > This will indeed also solve the problem by removing the comparison in > B.1.1 which is using the potentially stale > src/frame.h:MOUSE_HL_INFO, which to me seems to be the source of the > problem. And it is an even better solution, since that part of the > code might have been included there only by mistake. Nice catch! This should now be fixed on the master branch. > Regardless of this though, assuming the above sketch is correct, > shouldn't we also consider fixing the code in > src/xdisp.c:remember_mouse_glyph so as to set the > src/w32term.h:FRAME_DISPLAY_INFO's `last_mouse_glyph' using > `text-glyph' coordinates, so as for A.1.1 to fire up based on the actual tab-bar > glyph coordinates during a mouse move (so that MOUSE_HL_INFO does not > contain stale information)? I can't think of a reason why we might want this to > be set using virtual-glyph coords when over the tab-bar (but then, I can only see some of > the pieces and not the whole picture as you do). If you can show some scenario where this causes real problems, I will look into it. In my testing, I saw no problems, and the coordinates I saw weren't wrong, in the sense that they missed some glyphs due to problems with glyph dimensions.