1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

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.
This commit is contained in:
Andrew De Ponte 2017-12-13 13:30:27 -08:00 committed by Joe Wilm
parent 94caa7667d
commit d0fb4c563f

View file

@ -1,32 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <plist version="1.0">
<dict> <dict>
<key>CFBundleDisplayName</key> <key>CFBundleDevelopmentRegion</key>
<string>Alacritty</string> <string>en</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>alacritty</string> <string>alacritty</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>io.alacritty</string> <string>io.alacritty</string>
<key>CFBundleName</key> <key>CFBundleInfoDictionaryVersion</key>
<string>Alacritty</string> <string>6.0</string>
<key>CFBundleIconFile</key> <key>CFBundleName</key>
<string>alacritty.icns</string> <string>Alacritty</string>
<key>CFBundleShortVersionString</key> <key>CFBundlePackageType</key>
<string>0.1.0</string> <string>APPL</string>
<key>CFBundleVersion</key> <key>CFBundleShortVersionString</key>
<string>0.1.0</string> <string>0.1.0</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleSupportedPlatforms</key>
<string>en</string> <array>
<key>CFBundlePackageType</key> <string>MacOSX</string>
<string>APPL</string> </array>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleVersion</key>
<string>6.0</string> <string>1</string>
<key>NSHighResolutionCapable</key> <key>CFBundleIconFile</key>
<true/> <string>alacritty.icns</string>
<key>NSMainNibFile</key> <key>NSHighResolutionCapable</key>
<string></string> <true/>
<key>NSSupportsAutomaticGraphicsSwitching</key> <key>NSMainNibFile</key>
<true/> <string></string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>CFBundleDisplayName</key>
<string>Alacritty</string>
</dict> </dict>
</plist> </plist>