mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 06:01:13 +00:00
Fix undo menu appearing when opening the keyboard on iOS 16
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// KeyboardInputField.h
|
||||||
|
// Moonlight
|
||||||
|
//
|
||||||
|
// Created by Cameron Gutman on 12/2/22.
|
||||||
|
// Copyright © 2022 Moonlight Game Streaming Project. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface KeyboardInputField : UITextField
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// KeyboardInputField.m
|
||||||
|
// Moonlight
|
||||||
|
//
|
||||||
|
// Created by Cameron Gutman on 12/2/22.
|
||||||
|
// Copyright © 2022 Moonlight Game Streaming Project. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "KeyboardInputField.h"
|
||||||
|
|
||||||
|
@implementation KeyboardInputField
|
||||||
|
|
||||||
|
- (UIEditingInteractionConfiguration) editingInteractionConfiguration {
|
||||||
|
// Suppress the Undo menu that appears with a 3 finger tap
|
||||||
|
return UIEditingInteractionConfigurationNone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -13,13 +13,14 @@
|
|||||||
#import "KeyboardSupport.h"
|
#import "KeyboardSupport.h"
|
||||||
#import "RelativeTouchHandler.h"
|
#import "RelativeTouchHandler.h"
|
||||||
#import "AbsoluteTouchHandler.h"
|
#import "AbsoluteTouchHandler.h"
|
||||||
|
#import "KeyboardInputField.h"
|
||||||
|
|
||||||
static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||||
|
|
||||||
@implementation StreamView {
|
@implementation StreamView {
|
||||||
OnScreenControls* onScreenControls;
|
OnScreenControls* onScreenControls;
|
||||||
|
|
||||||
UITextField* keyInputField;
|
KeyboardInputField* keyInputField;
|
||||||
BOOL isInputingText;
|
BOOL isInputingText;
|
||||||
|
|
||||||
float streamAspectRatio;
|
float streamAspectRatio;
|
||||||
@@ -52,7 +53,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
|
|
||||||
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
|
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
|
||||||
|
|
||||||
keyInputField = [[UITextField alloc] initWithFrame:CGRectZero];
|
keyInputField = [[KeyboardInputField alloc] initWithFrame:CGRectZero];
|
||||||
[keyInputField setKeyboardType:UIKeyboardTypeDefault];
|
[keyInputField setKeyboardType:UIKeyboardTypeDefault];
|
||||||
[keyInputField setAutocorrectionType:UITextAutocorrectionTypeNo];
|
[keyInputField setAutocorrectionType:UITextAutocorrectionTypeNo];
|
||||||
[keyInputField setAutocapitalizationType:UITextAutocapitalizationTypeNone];
|
[keyInputField setAutocapitalizationType:UITextAutocapitalizationTypeNone];
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
9865DC38213287FE0005B9B9 /* LoadingFrameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB4A23B71A9D3637004D2EF2 /* LoadingFrameViewController.m */; };
|
9865DC38213287FE0005B9B9 /* LoadingFrameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB4A23B71A9D3637004D2EF2 /* LoadingFrameViewController.m */; };
|
||||||
9865DC3C2132922E0005B9B9 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9865DC3B2132922E0005B9B9 /* GameController.framework */; };
|
9865DC3C2132922E0005B9B9 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9865DC3B2132922E0005B9B9 /* GameController.framework */; };
|
||||||
9865DC3E21332D660005B9B9 /* MainFrameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB89462519F646E200339C8A /* MainFrameViewController.m */; };
|
9865DC3E21332D660005B9B9 /* MainFrameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB89462519F646E200339C8A /* MainFrameViewController.m */; };
|
||||||
|
988FCD41293B091B003050E2 /* KeyboardInputField.m in Sources */ = {isa = PBXBuildFile; fileRef = 988FCD40293B091B003050E2 /* KeyboardInputField.m */; };
|
||||||
|
988FCD42293B091B003050E2 /* KeyboardInputField.m in Sources */ = {isa = PBXBuildFile; fileRef = 988FCD40293B091B003050E2 /* KeyboardInputField.m */; };
|
||||||
9890CF6B203B7EE1006C4B06 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9890CF6A203B7EE1006C4B06 /* libxml2.tbd */; };
|
9890CF6B203B7EE1006C4B06 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9890CF6A203B7EE1006C4B06 /* libxml2.tbd */; };
|
||||||
9896219723D15C7000211983 /* X1Kit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9896219623D15C7000211983 /* X1Kit.swift */; };
|
9896219723D15C7000211983 /* X1Kit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9896219623D15C7000211983 /* X1Kit.swift */; };
|
||||||
9896219A23D56E8100211983 /* X1Kit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9896219623D15C7000211983 /* X1Kit.swift */; };
|
9896219A23D56E8100211983 /* X1Kit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9896219623D15C7000211983 /* X1Kit.swift */; };
|
||||||
@@ -187,6 +189,8 @@
|
|||||||
986CCE6C2133E45300168291 /* Moonlight v1.2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.2.xcdatamodel"; sourceTree = "<group>"; };
|
986CCE6C2133E45300168291 /* Moonlight v1.2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.2.xcdatamodel"; sourceTree = "<group>"; };
|
||||||
986E28A528EA989100758361 /* Moonlight v1.9.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.9.xcdatamodel"; sourceTree = "<group>"; };
|
986E28A528EA989100758361 /* Moonlight v1.9.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.9.xcdatamodel"; sourceTree = "<group>"; };
|
||||||
98783FEA242EAC5D00F00EF4 /* Moonlight v1.5.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.5.xcdatamodel"; sourceTree = "<group>"; };
|
98783FEA242EAC5D00F00EF4 /* Moonlight v1.5.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.5.xcdatamodel"; sourceTree = "<group>"; };
|
||||||
|
988FCD3F293B091B003050E2 /* KeyboardInputField.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyboardInputField.h; sourceTree = "<group>"; };
|
||||||
|
988FCD40293B091B003050E2 /* KeyboardInputField.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeyboardInputField.m; sourceTree = "<group>"; };
|
||||||
9890CF6A203B7EE1006C4B06 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
|
9890CF6A203B7EE1006C4B06 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
|
||||||
9896219623D15C7000211983 /* X1Kit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = X1Kit.swift; path = X1Kit/Sources/X1Kit/X1Kit.swift; sourceTree = "<group>"; };
|
9896219623D15C7000211983 /* X1Kit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = X1Kit.swift; path = X1Kit/Sources/X1Kit/X1Kit.swift; sourceTree = "<group>"; };
|
||||||
9897B6A0221260EF00966419 /* Controller.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Controller.m; sourceTree = "<group>"; };
|
9897B6A0221260EF00966419 /* Controller.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Controller.m; sourceTree = "<group>"; };
|
||||||
@@ -569,6 +573,8 @@
|
|||||||
9819CC13254F107A008A7C8E /* RelativeTouchHandler.m */,
|
9819CC13254F107A008A7C8E /* RelativeTouchHandler.m */,
|
||||||
9819CC20254F180F008A7C8E /* AbsoluteTouchHandler.h */,
|
9819CC20254F180F008A7C8E /* AbsoluteTouchHandler.h */,
|
||||||
9819CC21254F180F008A7C8E /* AbsoluteTouchHandler.m */,
|
9819CC21254F180F008A7C8E /* AbsoluteTouchHandler.m */,
|
||||||
|
988FCD3F293B091B003050E2 /* KeyboardInputField.h */,
|
||||||
|
988FCD40293B091B003050E2 /* KeyboardInputField.m */,
|
||||||
);
|
);
|
||||||
path = Input;
|
path = Input;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -1022,6 +1028,7 @@
|
|||||||
9819CC1D254F1730008A7C8E /* RelativeTouchHandler.m in Sources */,
|
9819CC1D254F1730008A7C8E /* RelativeTouchHandler.m in Sources */,
|
||||||
FB1A67AB213245C500507771 /* CryptoManager.m in Sources */,
|
FB1A67AB213245C500507771 /* CryptoManager.m in Sources */,
|
||||||
FB1A67AF213245C500507771 /* IdManager.m in Sources */,
|
FB1A67AF213245C500507771 /* IdManager.m in Sources */,
|
||||||
|
988FCD42293B091B003050E2 /* KeyboardInputField.m in Sources */,
|
||||||
FB1A67A3213245BD00507771 /* Connection.m in Sources */,
|
FB1A67A3213245BD00507771 /* Connection.m in Sources */,
|
||||||
FB1A67A5213245BD00507771 /* StreamConfiguration.m in Sources */,
|
FB1A67A5213245BD00507771 /* StreamConfiguration.m in Sources */,
|
||||||
FB1A67A7213245BD00507771 /* StreamManager.m in Sources */,
|
FB1A67A7213245BD00507771 /* StreamManager.m in Sources */,
|
||||||
@@ -1082,6 +1089,7 @@
|
|||||||
FB4A23B81A9D3637004D2EF2 /* LoadingFrameViewController.m in Sources */,
|
FB4A23B81A9D3637004D2EF2 /* LoadingFrameViewController.m in Sources */,
|
||||||
FB9AFD3A1A7E05CE00872C98 /* ServerInfoResponse.m in Sources */,
|
FB9AFD3A1A7E05CE00872C98 /* ServerInfoResponse.m in Sources */,
|
||||||
FB89463119F646E200339C8A /* StreamManager.m in Sources */,
|
FB89463119F646E200339C8A /* StreamManager.m in Sources */,
|
||||||
|
988FCD41293B091B003050E2 /* KeyboardInputField.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user