Skip to content

Commit

Permalink
showing a main window when the app become active
Browse files Browse the repository at this point in the history
  • Loading branch information
nhiroyasu committed Feb 3, 2024
1 parent ee16229 commit b0277ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ScrollableSimulator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
CODE_SIGN_ENTITLEMENTS = ScrollableSimulator/ScrollableSimulator.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 2CMV7D36JC;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
Expand All @@ -399,7 +399,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.2.1;
MARKETING_VERSION = 0.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.nhiro1109.debug.ScrollableSimulator;
PRODUCT_NAME = "Scrollable Simulator for debug";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -415,7 +415,7 @@
CODE_SIGN_ENTITLEMENTS = ScrollableSimulator/ScrollableSimulator.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 2CMV7D36JC;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
Expand All @@ -430,7 +430,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.2.1;
MARKETING_VERSION = 0.3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.nhiro1109.ScrollableSimulator;
PRODUCT_NAME = "Scrollable Simulator";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
6 changes: 5 additions & 1 deletion ScrollableSimulator/AppService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ class AppService {
}
}

func didBecomeActive() {}
func didBecomeActive() {
NSApplication.shared.windows.forEach {
$0.makeKeyAndOrderFront(nil)
}
}

func terminate() {
scrollableSimulator?.deactivate()
Expand Down

0 comments on commit b0277ca

Please sign in to comment.