git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: cherpake@me.com
Cc: Git List <git@vger.kernel.org>
Subject: Re: Gitk doesn't work on macOS Mojave
Date: Thu, 19 Jul 2018 17:49:17 -0400	[thread overview]
Message-ID: <CAPig+cRYVwsMxUQGWHWyfC1gpVgEtt0VH-CmQoGizEAp-B_7WQ@mail.gmail.com> (raw)
In-Reply-To: <1569C0A9-7C44-4F28-9C9B-AF2489E021AB@me.com>

[please reply inline rather than top-posting]

On Thu, Jul 19, 2018 at 5:11 PM Evgeny Cherpak <cherpake@me.com> 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 Gitk doesn't work on macOS Mojave 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]       ` <BD1EAEBF-B125-4D3E-A814-F8824E5D2CA8@me.com>
     [not found]         ` <CAPig+cTRdh56VVcOGzeJmUN-L0-v2i+rCdMGxdr1FEUgfUGw4g@mail.gmail.com>
     [not found]           ` <5196A9EF-3967-4E4A-A929-58CD8BE72150@me.com>
     [not found]             ` <CAPig+cRDTMW5O1T20CnK03wWb9W8ev9q34U4P4rRk-3hrnNfGg@mail.gmail.com>
     [not found]               ` <C9089D48-5516-4EF9-9260-BADD62FA3CBD@me.com>
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAPig+cRYVwsMxUQGWHWyfC1gpVgEtt0VH-CmQoGizEAp-B_7WQ@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=cherpake@me.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 public inbox

	https://80x24.org/mirrors/git.git

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).