list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <>
Cc: Git List <>
Subject: Re: Gitk doesn't work on macOS Mojave
Date: Thu, 19 Jul 2018 17:49:17 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[please reply inline rather than top-posting]

On Thu, Jul 19, 2018 at 5:11 PM Evgeny Cherpak <> wrote:
> It seems this code placed at the end of the file, after getcommits() does the trick:
> if {[tk windowingsystem] eq "aqua"} {
>         set openscript [format {
>                 open -a \"$(ps -p %d -o comm=)\"
>         } [pid] ]
>     exec osascript -e [format {
>                 do shell script "%s"
>     } "$openscript” ]
> }

Interesting idea. A shortcoming of this approach is that it's
non-deterministic. It will bring _any_ running gitk to the foreground,
rather than the one mentioned by PID, which would be a potentially
confusing regression. Such confusion _might_ be worse than simply not
foregrounding the application at all (though that's a matter of
opinion). Unfortunately, the 'open' command doesn't let you do so by
PID, and Googling shows only answers which predate Mojave (that is,
they all suggest Apple Events).

To avoid such a regression on older MacOS's, it would be nice to
retain the Apple Events code, but that would mean gitk would need to
do a version check or something to avoid executing the Apple Events
code on Mojave.

By the way, the same problem presumably afflicts "git gui", which has
identical code in it for foregrounding the application. Does that
match with your experience?

  reply	other threads:[~2018-07-19 21:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 18:05 Evgeny Cherpak
2018-07-19 19:12 ` Eric Sunshine
2018-07-19 21:11   ` Evgeny Cherpak
2018-07-19 21:49     ` Eric Sunshine [this message]
     [not found]       ` <>
     [not found]         ` <>
     [not found]           ` <>
     [not found]             ` <>
     [not found]               ` <>
2018-07-20  6:25                 ` Eric Sunshine
2018-07-20  6:26                   ` Evgeny Cherpak
2018-07-24  6:51                   ` [PATCH] gitk: fix MacOS 10.14 "Mojave" crash on launch Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).