git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Haller <stefan@haller-berlin.de>
To: git@vger.kernel.org
Cc: me@yadavpratyush.com
Subject: [PATCH] git-gui blame: prevent tool tips from sticking around after Command-Tab
Date: Tue, 13 Oct 2020 15:26:43 +0200	[thread overview]
Message-ID: <20201013132643.3209-1-stefan@haller-berlin.de> (raw)

On Mac, tooltips are not automatically removed when a window loses
focus. Furthermore, mouse-move events are only dispatched to the active
window, which means that if we Command-tab to another application while
a tool tip is showing, the tool tip will stay there forever (in front of
other applications). So we must hide it manually when we lose focus.

I'm doing this unconditionally here (i.e. without if {[is_MacOSX]}); it
shouldn't hurt on other platforms, even though they don't seem to have
this problem.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
---
 lib/blame.tcl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/blame.tcl b/lib/blame.tcl
index 62ec083..8441e10 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -328,6 +328,7 @@ constructor new {i_commit i_path i_jump} {
 		bind $i <Any-Motion>  [cb _show_tooltip $i @%x,%y]
 		bind $i <Any-Enter>   [cb _hide_tooltip]
 		bind $i <Any-Leave>   [cb _hide_tooltip]
+		bind $i <Deactivate>  [cb _hide_tooltip]
 		bind_button3 $i "
 			[cb _hide_tooltip]
 			set cursorX %x
-- 
2.29.0.rc1.12.gf22076828a


             reply	other threads:[~2020-10-13 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 13:26 Stefan Haller [this message]
2020-10-13 15:17 ` [PATCH] git-gui blame: prevent tool tips from sticking around after Command-Tab Pratyush Yadav
2020-10-17  9:37   ` Pratyush Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201013132643.3209-1-stefan@haller-berlin.de \
    --to=stefan@haller-berlin.de \
    --cc=git@vger.kernel.org \
    --cc=me@yadavpratyush.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).