mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
change some code style
This commit is contained in:
parent
065d1acc2b
commit
a8e57bc169
@ -63,7 +63,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
version string = "v0.47.0.490, Mount Cook!"
|
||||
version string = "v0.47.0.491, Mount Cook!"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user