From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#47581: 27.1; tab-bar missed mouse clicks on MS-Windows Date: Mon, 05 Apr 2021 02:00:47 +0300 Organization: LINKOV.NET Message-ID: <87mtudac4g.fsf@mail.linkov.net> References: <83pmzbeajw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5866"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Ioannis Kappas , 47581@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 05 01:06:26 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 1lTBp4-0001Q4-JF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Apr 2021 01:06:26 +0200 Original-Received: from localhost ([::1]:57324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTBp3-00039S-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 19:06:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTBog-0002m0-Kz for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 19:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTBog-0006A0-Dx for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 19:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTBog-0003Xs-8e for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 19:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Apr 2021 23:06:02 +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.161757750713553 (code B ref 47581); Sun, 04 Apr 2021 23:06:02 +0000 Original-Received: (at 47581) by debbugs.gnu.org; 4 Apr 2021 23:05:07 +0000 Original-Received: from localhost ([127.0.0.1]:36620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTBnm-0003WV-VO for submit@debbugs.gnu.org; Sun, 04 Apr 2021 19:05:07 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:31845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTBnj-0003Vh-8t for 47581@debbugs.gnu.org; Sun, 04 Apr 2021 19:05:05 -0400 X-Originating-IP: 91.129.107.223 Original-Received: from mail.gandi.net (m91-129-107-223.cust.tele2.ee [91.129.107.223]) (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 68986240003; Sun, 4 Apr 2021 23:04:55 +0000 (UTC) In-Reply-To: <83pmzbeajw.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Apr 2021 16:56:35 +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" Xref: news.gmane.io gmane.emacs.bugs:203572 Archived-At: > 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. > > Juri, why is that code present in handle_tab_bar_click? Is that just > a copy/paste from handle_tool_bar_click, or is there some reason for > that? I'm talking about this logic, and the comments which describe > it, in handle_tab_bar_click: Indeed, this code was copied from handle_tool_bar_click, but this extra logic was not removed because there are parts of the tab bar that should respond to moving the mouse pointer, namely the tab close buttons are activated when the mouse pointer is moved over them. But I'm not sure if this feature is related to this code, or won't be affected by removing this code. > /* If not on the highlighted tab-bar item, and mouse-highlight is > non-nil, return. This is so we generate the tab-bar button > click only when the mouse button is released on the same item as > where it was pressed. However, when mouse-highlight is disabled, > generate the click when the button is released regardless of the > highlight, since tab-bar items are not highlighted in that > case. */ > frame_to_window_pixel_xy (w, &x, &y); > ts = get_tab_bar_item (f, x, y, &glyph, &hpos, &vpos, &prop_idx, &close_p); > if (ts == -1 > || (ts != 0 && !NILP (Vmouse_highlight))) > return; > > /* When mouse-highlight is off, generate the click for the item > where the button was pressed, disregarding where it was > released. */ > if (NILP (Vmouse_highlight) && !down_p) > prop_idx = f->last_tab_bar_item;