diff options
author | Andrew De Ponte <cyphactor@gmail.com> | 2017-12-13 13:30:27 -0800 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-13 13:30:27 -0800 |
commit | d0fb4c563f8fe9d995cdcaec7b2b16e77e19d1a2 (patch) | |
tree | 2c5b560210d6a06f2cf6c70f1c44b9025776197c | |
parent | 94caa7667da2baba3c762e661a84a806d2212731 (diff) | |
download | alacritty-d0fb4c563f8fe9d995cdcaec7b2b16e77e19d1a2.tar.gz alacritty-d0fb4c563f8fe9d995cdcaec7b2b16e77e19d1a2.zip |
On macOS when launching multiple times focus win (#941)
I dug into this and narrowed the issue down to the macOS app bundle
Info.plist file. So, I spun up a native macOS app real quick and tested
it by launching the binary directly and launching it via the app bundle.
When launching from the command line directly, it created multiple
windows & instances of the app. However, when launching via the app
bundle it behaved as I normally expect a macOS app to behave, that is
when launched multiple times to simply focus the already existing window
and instance.
This informed me that it wasn't something in code as much as it was
something in the app bundle configuration. Hence, I reworked the
Info.plist file based on the one that was created by XCode when I made
the native macOS app and it started behaving as expected.
-rw-r--r-- | assets/osx/Alacritty.app/Contents/Info.plist | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/assets/osx/Alacritty.app/Contents/Info.plist b/assets/osx/Alacritty.app/Contents/Info.plist index 9016ca4d..3aa2f703 100644 --- a/assets/osx/Alacritty.app/Contents/Info.plist +++ b/assets/osx/Alacritty.app/Contents/Info.plist @@ -1,32 +1,36 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>CFBundleDisplayName</key> - <string>Alacritty</string> - <key>CFBundleExecutable</key> - <string>alacritty</string> - <key>CFBundleIdentifier</key> - <string>io.alacritty</string> - <key>CFBundleName</key> - <string>Alacritty</string> - <key>CFBundleIconFile</key> - <string>alacritty.icns</string> - <key>CFBundleShortVersionString</key> - <string>0.1.0</string> - <key>CFBundleVersion</key> - <string>0.1.0</string> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>NSHighResolutionCapable</key> - <true/> - <key>NSMainNibFile</key> - <string></string> - <key>NSSupportsAutomaticGraphicsSwitching</key> - <true/> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>alacritty</string> + <key>CFBundleIdentifier</key> + <string>io.alacritty</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>Alacritty</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>0.1.0</string> + <key>CFBundleSupportedPlatforms</key> + <array> + <string>MacOSX</string> + </array> + <key>CFBundleVersion</key> + <string>1</string> + <key>CFBundleIconFile</key> + <string>alacritty.icns</string> + <key>NSHighResolutionCapable</key> + <true/> + <key>NSMainNibFile</key> + <string></string> + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> + <key>CFBundleDisplayName</key> + <string>Alacritty</string> </dict> </plist> |