mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Merge pull request #1804 from sparkle-project/no-hide-on-deactivate
Don't hide standard updater window on deactivation
This commit is contained in:
4 files changed
+3
-15
No files matched your search
Vendored
+2
-2
@@ -20,12 +20,12 @@
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window identifier="SUUpdateAlert" title="Software Update" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="SUUpdateAlert" animationBehavior="default" id="5" userLabel="Update Alert (release notes)">
|
||||
<window identifier="SUUpdateAlert" title="Software Update" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="SUUpdateAlert" animationBehavior="default" id="5" userLabel="Update Alert (release notes)">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="746" y="229" width="620" height="370"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
|
||||
<value key="minSize" type="size" width="550" height="150"/>
|
||||
<view key="contentView" id="6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="620" height="370"/>
|
||||
|
||||
Vendored
-5
@@ -34,11 +34,6 @@ SU_EXPORT @interface SPUStandardUserDriver : NSObject <SPUUserDriver>
|
||||
*/
|
||||
- (instancetype)initWithHostBundle:(NSBundle *)hostBundle delegate:(nullable id<SPUStandardUserDriverDelegate>)delegate;
|
||||
|
||||
/*!
|
||||
* Enable or disable hideOnDeactivate for standard update window.
|
||||
*/
|
||||
@property (nonatomic) BOOL hideOnDeactivate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
-7
@@ -39,7 +39,6 @@
|
||||
@synthesize delegate = _delegate;
|
||||
@synthesize checkingController = _checkingController;
|
||||
@synthesize activeUpdateAlert = _activeUpdateAlert;
|
||||
@synthesize hideOnDeactivate = _hideOnDeactivate;
|
||||
@synthesize statusController = _statusController;
|
||||
|
||||
#pragma mark Birth
|
||||
@@ -51,7 +50,6 @@
|
||||
_host = [[SUHost alloc] initWithBundle:hostBundle];
|
||||
_delegate = delegate;
|
||||
_coreComponent = [[SPUUserDriverCoreComponent alloc] init];
|
||||
_hideOnDeactivate = YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -83,15 +81,10 @@
|
||||
// Make sure the window is loaded in any case
|
||||
[self.activeUpdateAlert window];
|
||||
|
||||
if (!self.hideOnDeactivate) {
|
||||
[self.activeUpdateAlert.window setHidesOnDeactivate:NO];
|
||||
}
|
||||
|
||||
// If the app is a menubar app or the like, we need to focus it first and alter the
|
||||
// update prompt to behave like a normal window. Otherwise if the window were hidden
|
||||
// there may be no way for the application to be activated to make it visible again.
|
||||
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
|
||||
[self.activeUpdateAlert.window setHidesOnDeactivate:NO];
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class SUTestApplicationTest: XCTestCase
|
||||
menuBarsQuery.menuBarItems["Sparkle Test App"].click()
|
||||
}
|
||||
|
||||
app.dialogs["SUUpdateAlert"].buttons["Install Update"].click()
|
||||
app.windows["SUUpdateAlert"].buttons["Install Update"].click()
|
||||
|
||||
// Give some time for the update to finish downloading / extracting
|
||||
sleep(30)
|
||||
|
||||
Reference in new issue
Block a user