Skip to content

Commit

Permalink
fix onBecameActive
Browse files Browse the repository at this point in the history
  • Loading branch information
nhiroyasu committed Feb 3, 2024
1 parent 7b58990 commit 24c40f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 3 additions & 1 deletion ScrollableSimulator/AppService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class AppService {

func didBecomeActive() {
NSApplication.shared.windows.forEach {
$0.makeKeyAndOrderFront(nil)
if $0.identifier?.rawValue == "main" {
$0.makeKeyAndOrderFront(nil)
}
}
}

Expand Down
8 changes: 1 addition & 7 deletions ScrollableSimulator/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="1eI-4O-JNW"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="ytW-ob-4Nd">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="Ady-hI-5gd" id="N7B-cg-lsv"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="R6o-c8-3aW"/>
<menuItem title="Bring All to Front" id="Mt5-He-OKM">
<modifierMask key="keyEquivalentModifierMask"/>
Expand All @@ -114,7 +108,7 @@
<scene sceneID="lpT-4Y-fhy">
<objects>
<windowController storyboardIdentifier="main" showSeguePresentationStyle="single" id="CTg-AR-Cl4" sceneMemberID="viewController">
<window key="window" title="Scrollable Simulator" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="ewh-JT-qi6">
<window key="window" identifier="main" title="Scrollable Simulator" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="ewh-JT-qi6">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<rect key="contentRect" x="604" y="462" width="480" height="270"/>
<rect key="screenRect" x="0.0" y="0.0" width="3440" height="1415"/>
Expand Down

0 comments on commit 24c40f4

Please sign in to comment.