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

Re: [PATCH v2] git-gui: bring Wish process to front on Mac

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 14, 2013, 17:54 UTC
Message-ID
<7vwqpwo9wd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1370642211-34416-1-git-send-email-stefan@haller-berlin.de>
Stefan Haller <stefan@haller-berlin.de> writes:
Show 9 quoted lines
> On Mac OS X, any application that is started from the Terminal will open
> behind all running applications; as a work-around, manually bring ourselves
> to the front. (Stolen from gitk, commit 76bf6ff93e.)
>
> We do this as the very first thing, so that any message boxes that might pop
> up during the rest of the startup sequence are actually seen by the user.
>
> Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
> ---

Pat, is there any progress on this? I do not mind, and I actually would prefer, a pull request early in the development cycle.

"I've been busy and haven't got around to it", is a perfectly acceptable response. Just pinging to check.

Show 33 quoted lines
> Changes since the first patch: 
>  - add catch
>  - specify full path to /usr/bin/osascript
>
>  git-gui.sh | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/git-gui.sh b/git-gui.sh
> index e133331..a792924 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -29,6 +29,21 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA}]
>  
>  ######################################################################
>  ##
> +## On Mac, bring the current Wish process window to front
> +
> +if {[tk windowingsystem] eq "aqua"} {
> +	catch {
> +		exec /usr/bin/osascript -e [format {
> +			tell application "System Events"
> +				set frontmost of processes whose unix id is %d to true
> +			end tell
> +		} [pid] ]
> +	}
> +}
> +
> +
> +######################################################################
> +##
>  ## Tcl/Tk sanity check
>  
>  if {[catch {package require Tcl 8.4} err]
Previous: Stefan HallerNext: Pat Thoyts
Message 5 of 8 in “git-gui: bring Wish process to front on Mac”
  1. git-gui: bring Wish process to front on MacStefan Haller, Jun 6, 2013
  2. Pat ThoytsJun 6, 2013
  3. Stefan HallerJun 6, 2013
  4. git-gui: bring Wish process to front on MacStefan Haller, Jun 7, 2013
  5. Junio C HamanoJun 14, 2013
  6. Pat ThoytsJun 15, 2013
  7. Junio C HamanoJun 6, 2013
  8. Stefan HallerJun 7, 2013

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.