mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-09 16:02:46 +08:00
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:
@@ -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: @""];
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
CFStringRef
|
||||
getDraggedFileURL()
|
||||
{
|
||||
NSString* pbName = NSPasteboardNameDrag;
|
||||
NSString* pbName = NSDragPboard;
|
||||
NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName];
|
||||
|
||||
NSMutableString* string;
|
||||
|
||||
Reference in New Issue
Block a user