change some code style

This commit is contained in:
vcaesar 2018-01-21 22:21:16 +08:00
parent 065d1acc2b
commit a8e57bc169
2 changed files with 34 additions and 32 deletions

View File

@ -63,7 +63,7 @@ import (
)
const (
version string = "v0.47.0.490, Mount Cook!"
version string = "v0.47.0.491, Mount Cook!"
)
type (

View File

@ -383,8 +383,7 @@ bool IsAxEnabled (bool options){
// Convert display prompt value into a dictionary
const void* k[] = { *gkAXTrustedCheckOptionPrompt };
const void* v[] = { displayPrompt };
CFDictionaryRef o = CFDictionaryCreate
(NULL, k, v, 1, NULL, NULL);
CFDictionaryRef o = CFDictionaryCreate(NULL, k, v, 1, NULL, NULL);
// Determine whether the process is actually trusted
bool result = (*gAXIsProcessTrustedWithOptions)(o);
@ -425,8 +424,10 @@ bool setHandle (uintptr handle){
mData.CgID = 0;
mData.AxID = 0;
if (handle == 0)return 0;
if (handle == 0){
return 0;
// return true;
}
// Retrieve the window element
CGWindowID cgID = (CGWindowID)handle;
@ -522,7 +523,8 @@ bool IsMinimized(void){
== kAXErrorSuccess && data != NULL){
// Convert resulting data into a bool
bool result = CFBooleanGetValue(data);
CFRelease (data); return result;
CFRelease(data);
return result;
}
return false;