We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03f6bfb commit ada1c2dCopy full SHA for ada1c2d
Sources/MenuBarExtraAccess/MenuBarExtraAccess.swift
@@ -150,6 +150,16 @@ struct MenuBarExtraAccess<Content: Scene>: Scene {
150
print("MenuBarExtra index \(index) drop-down window did resign as key.")
151
#endif
152
153
+ // it's possible for a window to resign key without actually closing, so let's
154
+ // close it as a failsafe.
155
+ if window.isVisible {
156
+ #if DEBUG
157
+ print("Closing MenuBarExtra index \(index) drop-down window as a result of it resigning as key.")
158
+ #endif
159
+
160
+ window.close()
161
+ }
162
163
MenuBarExtraUtils.setKnownPresented(for: .index(index), state: false)
164
isMenuPresented = false
165
}
0 commit comments