Skip to content

Commit b297e03

Browse files
stefanhallerprati0100
authored andcommitted
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 <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]>
1 parent 01121d6 commit b297e03

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/blame.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ constructor new {i_commit i_path i_jump} {
328328
bind $i <Any-Motion> [cb _show_tooltip $i @%x,%y]
329329
bind $i <Any-Enter> [cb _hide_tooltip]
330330
bind $i <Any-Leave> [cb _hide_tooltip]
331+
bind $i <Deactivate> [cb _hide_tooltip]
331332
bind_button3 $i "
332333
[cb _hide_tooltip]
333334
set cursorX %x

0 commit comments

Comments
 (0)