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#50993: 29.0.50; Problems when dragging the mouse over the toolbar Date: Thu, 14 Oct 2021 19:01:52 +0200 Message-ID: <003ea792-41ac-8113-21d1-0417e1314dbc@gmx.at> References: <87r1d2b9e2.fsf.ref@yahoo.com> <83lf30r8eq.fsf@gnu.org> <877dekcsc1.fsf@yahoo.com> <87ily4aur8.fsf@yahoo.com> <44097514-26fb-fe2f-fb82-cfb819f13d2a@gmx.at> <87k0ijalp8.fsf@yahoo.com> <878ryzafqk.fsf@yahoo.com> <87wnmj85o2.fsf@yahoo.com> <837deiqr3k.fsf@gnu.org> <52bbc081-e8a2-91b6-2b27-0dba6d8971c0@gmx.at> <83tuhmp793.fsf@gnu.org> <87lf2y6ncr.fsf@mail.linkov.net> <87mtnc921p.fsf@mail.linkov.net> <87ilxzk3o1.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8F25E08DB2475A980173EE39" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3973"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 50993@debbugs.gnu.org, monnier@iro.umontreal.ca To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 14 19:03:16 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 1mb48R-0000mU-JI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Oct 2021 19:03:15 +0200 Original-Received: from localhost ([::1]:35488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mb48P-0002Gw-HE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Oct 2021 13:03:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mb48F-0002EM-BW for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 13:03:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mb48D-0002tQ-Ng for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 13:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mb48D-00067V-JZ for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 13:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Oct 2021 17:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50993 X-GNU-PR-Package: emacs Original-Received: via spool by 50993-submit@debbugs.gnu.org id=B50993.163423092923465 (code B ref 50993); Thu, 14 Oct 2021 17:03:01 +0000 Original-Received: (at 50993) by debbugs.gnu.org; 14 Oct 2021 17:02:09 +0000 Original-Received: from localhost ([127.0.0.1]:36978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mb47M-00066P-Kf for submit@debbugs.gnu.org; Thu, 14 Oct 2021 13:02:08 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:37669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mb47J-00065m-Pt for 50993@debbugs.gnu.org; Thu, 14 Oct 2021 13:02:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1634230914; bh=gzzezjzPEvPtRVQiQGbV3lsmjaGn6gzF1lASFj3PAKU=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=MlvAVdtcarWDdn4rw0MkYCUv/vn1y2vo8tE9K/WPp7KIkEZ1izYxruFIdoXXvKNPa 1DguANzZrdtZdKdPUtaWcDKm8E1FYA33bPB6XiycT+4GAm3SdDOS2Q5yWs2OhPVMWp QpGMFA9V/mM24kSlf8HD4vubqHRqL4hbPtpkdUdY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.102] ([212.95.5.92]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYvcA-1mEyu219km-00UqHZ; Thu, 14 Oct 2021 19:01:54 +0200 In-Reply-To: <87ilxzk3o1.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:J9ZAd/cljMMXqtSyHB77X1/HC+EAcKwy3id9mcrR7NcGCwTj8RK nIw/epWRfFopSU1rLuvLbbjPHEmILom3WTdliYTDzM5YLkfh1cy9uZzvnTFS/WMfYWw9WoP xGSjz8bcDOm4UJZGRBLRYKTyM5ELekMXAxX8S25WemIVWetTvDU58na6DNAn88uidR0V40m c8PK+M1N4B63ZoqADoPHw== X-UI-Out-Filterresults: notjunk:1;V03:K0:uNXoXXnTRS0=:K/s2ObUu5m6muyvwiF37tn jRo33mGe0hSZMvOtWDHLl/5x4NRSYTcvfSV8OMDfWfsueh4H4eyeP8noztFDFXKzwKm+2UuRH J1uXQ6D7sjyLxZ+3vOqt+tC+zxNvzuoc4F/ig5bs5zAHUFTRt52PdvDJ8AyhkdrH0wNxQiDUS 2AwvQRkzwGfSCCNkOqh/4FRy7IeJ26Kd0E9TUcZfuNVVF3lLEDVMkxD5gO/cHx/OkfCY2/MG8 CrztMKISDaO7i6wDtfytDJ67+qn9itpN9l4QaPrua/UxhzC95alvkkitHOQTQm6Ftgzj4BlES eiX38mBYPkROFK7+LrkWkh5zuMXdbfwXmBjXtmgH5wcwyQhYSjmVuFps+lgmaOSbxK27hXiMF 3fbnVxR6iWZlNsR+m+Wxl4cF5u3fOpXDC/CsypqitCtclnJidLuVzvoXnSbMPdkfsa7FJq3W5 JRQo1ZdeJTJ58DF6MUF+E48tICBj2WY5GJ+IZ0g3sWXYQXxUiwUhRkXxPGRrkGp+uJiVmfZSG V7hj1ss95291e27LqkMZhUwzom4fDwH6jgFRHnmkrgpWCZcLVY7/lRXPOggX1lV8pUrRCwz4/ qCSO2AykuAx47P7v/D+IrcTIMXVeE4UpOtWdVUGjPm1bjzYo2xEuh2ZMRMF7RNE2djZYtq/n6 nh8DH1f/y7YU/bfiauEww3ERLJRuhf4zMURmeCT/CWvPcplR4UUv5ljhNrK3Oy7cZBTRjlnpT j+kPZ2h1ybUuFN7Y0krvye7kgBLnlS7dzYPymLNqvmy4WAMc8gJL2jMYIhODz1HVHbM0zmIi 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:217240 Archived-At: This is a multi-part message in MIME format. --------------8F25E08DB2475A980173EE39 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > Do you mean adding 'mouse-face highlight' to tab strings? > It has no effect on the tab bar. Maybe something is missing > in note_tab_bar_highlight? Probably. Try the attached only "cursorily" tested patch. martin --------------8F25E08DB2475A980173EE39 Content-Type: text/x-patch; name="tab-bar-drag-maybe.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tab-bar-drag-maybe.diff" diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index ccecdbc044..162c721751 100644 =2D-- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -113,6 +113,8 @@ tab-bar-select-tab-modifiers :group 'tab-bar :version "27.1") +(defvar tab-bar-drag-maybe) + (defun tab-bar--define-keys () "Install key bindings for switching between tabs if the user has config= ured them." (when tab-bar-select-tab-modifiers @@ -236,6 +238,7 @@ tab-bar--key-to-number (t t))) (defun tab-bar--event-to-item (posn) + (setq tab-bar-drag-maybe nil) (if (posn-window posn) (let ((caption (car (posn-string posn)))) (when caption @@ -263,6 +266,7 @@ tab-bar-mouse-select-tab (interactive "e") (let* ((item (tab-bar--event-to-item (event-start event))) (tab-number (tab-bar--key-to-number (nth 0 item)))) + (setq tab-bar-drag-maybe t) ;; Don't close the tab when clicked on the close button. ;; Let `tab-bar-mouse-close-tab-from-button' do this. (unless (nth 2 item) @@ -331,6 +335,7 @@ tab-bar-mouse-context-menu (defun tab-bar-mouse-move-tab (event) (interactive "e") + (setq tab-bar-drag-maybe nil) (let ((from (tab-bar--key-to-number (nth 0 (tab-bar--event-to-item (event-start event))))) diff --git a/src/xdisp.c b/src/xdisp.c index f802e89834..eb6e717a5b 100644 =2D-- a/src/xdisp.c +++ b/src/xdisp.c @@ -33411,7 +33411,13 @@ note_mouse_highlight (struct frame *f, int x, int= y) if (EQ (window, f->tab_bar_window)) { note_tab_bar_highlight (f, x, y); - return; + if (tab_bar_drag_maybe) + { + cursor =3D FRAME_OUTPUT_DATA (f)->hand_cursor; + goto set_cursor; + } + else + return; } #endif @@ -35543,6 +35549,10 @@ syms_of_xdisp (void) mouse stays within the extent of a single glyph (except for images). */)= ; mouse_fine_grained_tracking =3D false; + DEFVAR_BOOL ("tab-bar-drag-maybe", tab_bar_drag_maybe, + doc: /* Non-nil when maybe dragging tab bar item. */); + tab_bar_drag_maybe =3D false; + DEFVAR_BOOL ("redisplay-skip-initial-frame", redisplay_skip_initial_fra= me, doc: /* Non-nil to skip redisplay in initial frame. The initial frame is not displayed anywhere, so skipping it is --------------8F25E08DB2475A980173EE39--