chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
public enum KeyboardInputSafety {
|
||||
public enum FocusFailure: Equatable {
|
||||
case targetNotFocused
|
||||
case targetNotFocusedAfterRestore
|
||||
}
|
||||
|
||||
public static func syntheticInputFocusFailure(targetWindowFocused: Bool, restoreWindowRequested: Bool) -> FocusFailure? {
|
||||
guard !targetWindowFocused else {
|
||||
return nil
|
||||
}
|
||||
return restoreWindowRequested ? .targetNotFocusedAfterRestore : .targetNotFocused
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user