diff --git a/res/about/version.gmi b/res/about/version.gmi

index 4e273a3f..eb899c85 100644

--- a/res/about/version.gmi

+++ b/res/about/version.gmi

@@ -6,6 +6,9 @@

Release notes



+## 1.13.3

+* macOS: Fixed relaunching the app after installing an update via Sparkle.

+

1.13.2

diff --git a/src/macos.m b/src/macos.m

index 6b3870f7..af125dd2 100644

--- a/src/macos.m

+++ b/src/macos.m

@@ -35,6 +35,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */



#import <AppKit/AppKit.h>



+#if defined (LAGRANGE_ENABLE_SPARKLE)

+# import <Sparkle/Sparkle.h>

+#endif

+

static NSTouchBarItemIdentifier goBack_TouchId_ = @"fi.skyjake.Lagrange.back";

static NSTouchBarItemIdentifier goForward_TouchId_ = @"fi.skyjake.Lagrange.forward";

static NSTouchBarItemIdentifier find_TouchId_ = @"fi.skyjake.Lagrange.find";

@@ -206,7 +210,11 @@ static void ignoreImmediateKeyDownEvents_(void) {



/----------------------------------------------------------------------------------------------/



-@interface MyDelegate : NSResponder<NSApplicationDelegate, NSTouchBarDelegate> {

+@interface MyDelegate : NSResponder<NSApplicationDelegate, NSTouchBarDelegate

+#if defined (LAGRANGE_ENABLE_SPARKLE)

+ , SUUpdaterDelegate

+#endif 

+ > {

 enum iTouchBarVariant touchBarVariant;

 NSString *currentAppearanceName;

 NSObject<NSApplicationDelegate> *sdlDelegate;

@@ -221,6 +229,10 @@ static void ignoreImmediateKeyDownEvents_(void) {

+

+#if defined (LAGRANGE_ENABLE_SPARKLE)

+- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;

+#endif

@end



@implementation MyDelegate

@@ -292,16 +304,18 @@ static void appearanceChanged_MacOS_(NSString *name) {

 [sdlDelegate applicationDidFinishLaunching:notification];

}



+#if defined (LAGRANGE_ENABLE_SPARKLE)

+- (void)updaterWillRelaunchApplication:(SUUpdater *)updater {

+ /* Do allow the app to close now. */

+ postCommand_App("quit");

+}

+#endif

+

 return NO;

}



-// if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {

-// SDL_Event event;

-// event.type = SDL_QUIT;

-// SDL_PushEvent(&event);

-// }

 postCommand_App("quit");

 return NSTerminateCancel;

}

@@ -600,6 +614,9 @@ void setupApplication_MacOS(void) {

                                         }

                                         return event;

                                       }];

+#if defined (LAGRANGE_ENABLE_SPARKLE)

+ [[SUUpdater sharedUpdater] setDelegate:myDel];

+#endif

}



void hideTitleBar_MacOS(iWindow *window) {

@@ -963,7 +980,6 @@ iColor systemAccent_Color(void) {

}



#if defined (LAGRANGE_ENABLE_SPARKLE)

-#import <Sparkle/Sparkle.h>



void init_Updater(void) {

 SUUpdater *updater = [SUUpdater sharedUpdater];

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.17/pcdiff/f01dce101f7f2735669345948301849f732ceee3
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
66.929726 milliseconds
Gemini-to-HTML Time
4.025127 milliseconds

This content has been proxied by September (3851b).