git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-gui blame: prevent tool tips from sticking around after Command-Tab

From
Stefan Haller <stefan@haller-berlin.de>
Date
Oct 13, 2020, 13:26 UTC
Message-ID
<20201013132643.3209-1-stefan@haller-berlin.de>

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
Next: Pratyush Yadav
Message 1 of 3 in “git-gui blame: prevent tool tips from sticking around after Command-Tab”
  1. git-gui blame: prevent tool tips from sticking around after Command-TabStefan Haller, Oct 13, 2020
  2. Pratyush YadavOct 13, 2020
  3. Pratyush YadavOct 17, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.