From b297e03c6320a673264e9d4b15a086cee83239af Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 13 Oct 2020 15:26:43 +0200 Subject: git-gui: blame: prevent tool tips from sticking around after Command-Tab 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. Do 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 Signed-off-by: Pratyush Yadav --- lib/blame.tcl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/blame.tcl') diff --git a/lib/blame.tcl b/lib/blame.tcl index 62ec083667..8441e109be 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -328,6 +328,7 @@ constructor new {i_commit i_path i_jump} { bind $i [cb _show_tooltip $i @%x,%y] bind $i [cb _hide_tooltip] bind $i [cb _hide_tooltip] + bind $i [cb _hide_tooltip] bind_button3 $i " [cb _hide_tooltip] set cursorX %x -- cgit v1.2.3