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:21:31 +0300 Message-ID: <83h7kd41no.fsf@gnu.org> References: <83pmzbeajw.fsf@gnu.org> <87mtudac4g.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4887"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ioannis.kappas@gmail.com, 47581@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 11 11:22:09 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 1lVWID-00019o-4U for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 11:22:09 +0200 Original-Received: from localhost ([::1]:34598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVWIC-0005ON-2E for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 05:22:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVWI6-0005OH-RJ for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 05:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVWI6-0004KZ-K0 for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 05:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lVWI6-0004bw-G6 for bug-gnu-emacs@gnu.org; Sun, 11 Apr 2021 05:22: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: Sun, 11 Apr 2021 09:22: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.161813292017716 (code B ref 47581); Sun, 11 Apr 2021 09:22:02 +0000 Original-Received: (at 47581) by debbugs.gnu.org; 11 Apr 2021 09:22:00 +0000 Original-Received: from localhost ([127.0.0.1]:54007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVWI4-0004bg-3P for submit@debbugs.gnu.org; Sun, 11 Apr 2021 05:22:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVWI2-0004bR-Ig for 47581@debbugs.gnu.org; Sun, 11 Apr 2021 05:21:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59114) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVWHw-0004Ea-FX; Sun, 11 Apr 2021 05:21:52 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2487 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lVWHv-0003MJ-Um; Sun, 11 Apr 2021 05:21:52 -0400 In-Reply-To: <87mtudac4g.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 05 Apr 2021 02:00:47 +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:203835 Archived-At: > From: Juri Linkov > Cc: Ioannis Kappas , 47581@debbugs.gnu.org > Date: Mon, 05 Apr 2021 02:00:47 +0300 > > > 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. OK, I've fixed handle_tab_bar_click to not pay attention to mouse-highlight, please see if there are any adverse side effects of that change. I also removed note_tab_bar_highlight and the code which called it. I couldn't find any place which depended on that, and there was no visible effect of mouse-highlight on any part of the tab-bar buttons that I could see. If I missed something, please show a recipe where this highlight had any effect before my changes. (It _is_ possible to have the tab-bar buttons react to mouse pointer movements, but for that we need support in display code, which isn't there. If we will ever want to add mouse sensitivity to tab-bar buttons, we should first add code which displays those buttons differently when the draw_glyphs_face value is DRAW_MOUSE_FACE or DRAW_IMAGE_SUNKEN/RAISED; then we'd want to resurrect note_tab_bar_highlight that I deleted.)