Make HUD window front but not in focus
This commit is contained in:
@ -27,4 +27,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: e59f622df37d0fe135432c1ccda243973c311def
|
||||
|
||||
COCOAPODS: 1.2.0
|
||||
COCOAPODS: 1.2.0.beta.1
|
||||
|
2
Pods/Manifest.lock
generated
2
Pods/Manifest.lock
generated
@ -27,4 +27,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: e59f622df37d0fe135432c1ccda243973c311def
|
||||
|
||||
COCOAPODS: 1.2.0
|
||||
COCOAPODS: 1.2.0.beta.1
|
||||
|
@ -59,7 +59,7 @@ code_sign_if_enabled() {
|
||||
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
||||
# Use the current code_sign_identitiy
|
||||
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
|
||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
|
||||
|
||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||
code_sign_cmd="$code_sign_cmd &"
|
||||
|
@ -59,7 +59,7 @@ code_sign_if_enabled() {
|
||||
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
||||
# Use the current code_sign_identitiy
|
||||
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
|
||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
|
||||
|
||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||
code_sign_cmd="$code_sign_cmd &"
|
||||
|
@ -59,7 +59,7 @@ code_sign_if_enabled() {
|
||||
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
||||
# Use the current code_sign_identitiy
|
||||
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
|
||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
|
||||
|
||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||
code_sign_cmd="$code_sign_cmd &"
|
||||
|
@ -562,8 +562,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
toastWindowCtrl = ToastWindowController(windowNibName: "ToastWindowController")
|
||||
toastWindowCtrl.message = message
|
||||
toastWindowCtrl.showWindow(self)
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
toastWindowCtrl.window?.makeKeyAndOrderFront(self)
|
||||
//NSApp.activate(ignoringOtherApps: true)
|
||||
//toastWindowCtrl.window?.makeKeyAndOrderFront(self)
|
||||
toastWindowCtrl.fadeInHud()
|
||||
}
|
||||
}
|
||||
|
@ -34,10 +34,11 @@ class ToastWindowController: NSWindowController {
|
||||
if let win = self.window {
|
||||
win.isOpaque = false
|
||||
win.backgroundColor = .clear
|
||||
win.level = Int(CGWindowLevelForKey(.utilityWindow)) + 1000
|
||||
win.styleMask = .borderless
|
||||
win.hidesOnDeactivate = false
|
||||
win.collectionBehavior = .canJoinAllSpaces
|
||||
win.level = Int(CGWindowLevelForKey(.floatingWindow))
|
||||
win.orderFrontRegardless()
|
||||
}
|
||||
|
||||
let viewLayer: CALayer = CALayer()
|
||||
@ -83,8 +84,6 @@ class ToastWindowController: NSWindowController {
|
||||
|
||||
fadingOut = false
|
||||
|
||||
self.window?.orderFrontRegardless()
|
||||
|
||||
CATransaction.begin()
|
||||
CATransaction.setAnimationDuration(kHudFadeInDuration)
|
||||
CATransaction.setCompletionBlock { self.didFadeIn() }
|
||||
@ -113,7 +112,7 @@ class ToastWindowController: NSWindowController {
|
||||
|
||||
func didFadeOut() -> Void {
|
||||
if fadingOut {
|
||||
self.window?.orderOut(nil)
|
||||
self.window?.orderOut(self)
|
||||
}
|
||||
fadingOut = false
|
||||
}
|
||||
|
Reference in New Issue
Block a user