{"thread":{"id":"54405","subject":"[PATCH] git-gui blame: prevent tool tips from sticking around after Command-Tab","startedAt":"2020-10-13T13:33:43Z","lastAt":"2020-10-17T09:37:20Z","messageCount":3,"participants":["Stefan Haller","Pratyush Yadav"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"407442","messageId":"20201013132643.3209-1-stefan@haller-berlin.de","threadId":"54405","inReplyTo":null,"subject":"[PATCH] git-gui blame: prevent tool tips from sticking around after Command-Tab","fromName":"Stefan Haller","fromEmail":"stefan@haller-berlin.de","sentAt":"2020-10-13T13:26:43Z","receivedAt":"2020-10-13T13:33:43Z","isPatch":true,"sender":{"key":"stefan@haller-berlin.de","avatar":"https://avatars.githubusercontent.com/u/1225667?v=4"},"body":"On Mac, tooltips are not automatically removed when a window loses\nfocus. Furthermore, mouse-move events are only dispatched to the active\nwindow, which means that if we Command-tab to another application while\na tool tip is showing, the tool tip will stay there forever (in front of\nother applications). So we must hide it manually when we lose focus.\n\nI'm doing this unconditionally here (i.e. without if {[is_MacOSX]}); it\nshouldn't hurt on other platforms, even though they don't seem to have\nthis problem.\n\nSigned-off-by: Stefan Haller <stefan@haller-berlin.de>\n---\n lib/blame.tcl | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/lib/blame.tcl b/lib/blame.tcl\nindex 62ec083..8441e10 100644\n--- a/lib/blame.tcl\n+++ b/lib/blame.tcl\n@@ -328,6 +328,7 @@ constructor new {i_commit i_path i_jump} {\n \t\tbind $i <Any-Motion>  [cb _show_tooltip $i @%x,%y]\n \t\tbind $i <Any-Enter>   [cb _hide_tooltip]\n \t\tbind $i <Any-Leave>   [cb _hide_tooltip]\n+\t\tbind $i <Deactivate>  [cb _hide_tooltip]\n \t\tbind_button3 $i \"\n \t\t\t[cb _hide_tooltip]\n \t\t\tset cursorX %x\n-- \n2.29.0.rc1.12.gf22076828a\n\n"},{"id":"407452","messageId":"20201013151751.bq2raujl6dok2tvv@yadavpratyush.com","threadId":"54405","inReplyTo":"20201013132643.3209-1-stefan@haller-berlin.de","subject":"Re: [PATCH] git-gui blame: prevent tool tips from sticking around after Command-Tab","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2020-10-13T15:17:51Z","receivedAt":"2020-10-13T15:18:06Z","isPatch":true,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"Hi Stefan,\n\n> Subject: [PATCH] git-gui blame: prevent tool tips from sticking around\nNitpick:                  ^ Add a ':' here.\n\nOn 13/10/20 03:26PM, Stefan Haller wrote:\n> On Mac, tooltips are not automatically removed when a window loses\n> focus. Furthermore, mouse-move events are only dispatched to the active\n> window, which means that if we Command-tab to another application while\n> a tool tip is showing, the tool tip will stay there forever (in front of\n> other applications). So we must hide it manually when we lose focus.\n> \n> I'm doing this unconditionally here (i.e. without if {[is_MacOSX]}); it\n\nNitpick: s/I'm doing this/Do this/.\n\n> shouldn't hurt on other platforms, even though they don't seem to have\n> this problem.\n\nYes, I don't have this problem on Linux. But this patch does not make \nany visible difference/regressions either.\n \n> Signed-off-by: Stefan Haller <stefan@haller-berlin.de>\n> ---\n>  lib/blame.tcl | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/lib/blame.tcl b/lib/blame.tcl\n> index 62ec083..8441e10 100644\n> --- a/lib/blame.tcl\n> +++ b/lib/blame.tcl\n> @@ -328,6 +328,7 @@ constructor new {i_commit i_path i_jump} {\n>  \t\tbind $i <Any-Motion>  [cb _show_tooltip $i @%x,%y]\n>  \t\tbind $i <Any-Enter>   [cb _hide_tooltip]\n>  \t\tbind $i <Any-Leave>   [cb _hide_tooltip]\n> +\t\tbind $i <Deactivate>  [cb _hide_tooltip]\n>  \t\tbind_button3 $i \"\n>  \t\t\t[cb _hide_tooltip]\n>  \t\t\tset cursorX %x\n\nWill apply with the two nitpicks above fixed. No need to resend. Thanks.\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"407797","messageId":"20201017093713.ysk432l2n655go6k@yadavpratyush.com","threadId":"54405","inReplyTo":"20201013151751.bq2raujl6dok2tvv@yadavpratyush.com","subject":"Re: [PATCH] git-gui blame: prevent tool tips from sticking around after Command-Tab","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2020-10-17T09:37:13Z","receivedAt":"2020-10-17T09:37:20Z","isPatch":true,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 13/10/20 08:47PM, Pratyush Yadav wrote:\n> Hi Stefan,\n> \n> > Subject: [PATCH] git-gui blame: prevent tool tips from sticking around\n> Nitpick:                  ^ Add a ':' here.\n> \n> On 13/10/20 03:26PM, Stefan Haller wrote:\n> > On Mac, tooltips are not automatically removed when a window loses\n> > focus. Furthermore, mouse-move events are only dispatched to the active\n> > window, which means that if we Command-tab to another application while\n> > a tool tip is showing, the tool tip will stay there forever (in front of\n> > other applications). So we must hide it manually when we lose focus.\n> > \n> > I'm doing this unconditionally here (i.e. without if {[is_MacOSX]}); it\n> \n> Nitpick: s/I'm doing this/Do this/.\n> \n> > shouldn't hurt on other platforms, even though they don't seem to have\n> > this problem.\n> \n> Yes, I don't have this problem on Linux. But this patch does not make \n> any visible difference/regressions either.\n>  \n> > Signed-off-by: Stefan Haller <stefan@haller-berlin.de>\n> > ---\n> >  lib/blame.tcl | 1 +\n> >  1 file changed, 1 insertion(+)\n> > \n> > diff --git a/lib/blame.tcl b/lib/blame.tcl\n> > index 62ec083..8441e10 100644\n> > --- a/lib/blame.tcl\n> > +++ b/lib/blame.tcl\n> > @@ -328,6 +328,7 @@ constructor new {i_commit i_path i_jump} {\n> >  \t\tbind $i <Any-Motion>  [cb _show_tooltip $i @%x,%y]\n> >  \t\tbind $i <Any-Enter>   [cb _hide_tooltip]\n> >  \t\tbind $i <Any-Leave>   [cb _hide_tooltip]\n> > +\t\tbind $i <Deactivate>  [cb _hide_tooltip]\n> >  \t\tbind_button3 $i \"\n> >  \t\t\t[cb _hide_tooltip]\n> >  \t\t\tset cursorX %x\n> \n> Will apply with the two nitpicks above fixed. No need to resend. Thanks.\n\nApplied to git-gui/master. Thanks.\n\n-- \nRegards,\nPratyush Yadav\n"}]}