]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: blame: prevent tool tips from sticking around after Command-Tab
authorStefan Haller <stefan@haller-berlin.de>
Tue, 13 Oct 2020 13:26:43 +0000 (15:26 +0200)
committerPratyush Yadav <me@yadavpratyush.com>
Sat, 17 Oct 2020 09:34:35 +0000 (15:04 +0530)
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 <stefan@haller-berlin.de>
Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
lib/blame.tcl

index 62ec083667688dc6648952fc2be117aa5247fcc1..8441e109be32822df003d3ab3a221d742a74a8b7 100644 (file)
@@ -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