Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Sep 24, 2022
1 parent 6c61c50 commit 722d213
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FRAMEWORK_PATH = -F/System/Library/PrivateFrameworks
FRAMEWORK = -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge
FRAMEWORK = -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight
BUILD_FLAGS = -std=c99 -Wall -g -O0 -fvisibility=hidden -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64
BUILD_PATH = ./bin
DOC_PATH = ./doc
Expand Down
1 change: 0 additions & 1 deletion src/manifest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <ScriptingBridge/ScriptingBridge.h>
#include <Carbon/Carbon.h>
#include <Cocoa/Cocoa.h>
#include <objc/objc-runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion src/osax/common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef SA_COMMON_H
#define SA_COMMON_H

#define OSAX_VERSION "2.0.13"
#define OSAX_VERSION "2.0.14"

#define OSAX_ATTRIB_DOCK_SPACES 0x01
#define OSAX_ATTRIB_DPPM 0x02
Expand Down
12 changes: 1 addition & 11 deletions src/osax/payload.m
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ static bool start_daemon(char *socket_path)
return true;
}

__attribute__((constructor))
void load_payload(void)
{
NSLog(@"[yabai-sa] loaded payload..");
Expand All @@ -981,14 +982,3 @@ void load_payload(void)
NSLog(@"[yabai-sa] failed to spawn thread..");
}
}

@interface Payload : NSObject
+ (void) load;
@end

@implementation Payload
+ (void) load
{
load_payload();
}
@end
8 changes: 4 additions & 4 deletions src/sa.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ int scripting_addition_load(void)
goto out;
}

if (!scripting_addition_is_installed()) {
result = scripting_addition_install();
if (!scripting_addition_is_sip_friendly()) {
result = 1;
goto out;
}

if (!scripting_addition_is_sip_friendly()) {
result = 1;
if (scripting_addition_check() != 0) {
result = scripting_addition_install();
goto out;
}

Expand Down

0 comments on commit 722d213

Please sign in to comment.