revert some of the "deprecated" fixes so that older OSX versions are still supported. my thanks to Cpuroast for additional macos testing.

This commit is contained in:
walker0643
2018-02-15 01:17:18 -05:00
parent a8d0dfdacc
commit f5b5258f4a
6 changed files with 15 additions and 12 deletions

View File

@@ -35,7 +35,7 @@ runCocoaApp()
NSWindow* window = [[NSWindow alloc]
initWithContentRect: NSMakeRect(0, 0, 3, 3)
styleMask: NSWindowStyleMaskBorderless
styleMask: NSBorderlessWindowMask
backing: NSBackingStoreBuffered
defer: NO];
[window setTitle: @""];

View File

@@ -71,14 +71,14 @@ bool
fakeNativeMediaKey(KeyID id)
{
NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
data2:-1];
CGEventRef downEvent = [downRef CGEvent];
NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)

View File

@@ -133,14 +133,14 @@ bool
fakeNativeMediaKey(KeyID id)
{
NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
data2:-1];
CGEventRef downEvent = [downRef CGEvent];
NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)

View File

@@ -21,7 +21,7 @@
CFStringRef
getDraggedFileURL()
{
NSString* pbName = NSPasteboardNameDrag;
NSString* pbName = NSDragPboard;
NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName];
NSMutableString* string;