Add isVisible() to app.dock
This commit is contained in:
parent
eb73303f28
commit
7bde92deb9
5 changed files with 15 additions and 0 deletions
|
@ -208,6 +208,12 @@ void Browser::DockHide() {
|
|||
TransformProcessType(&psn, kProcessTransformToUIElementApplication);
|
||||
}
|
||||
|
||||
bool Browser::DockIsVisible() {
|
||||
// Because DockShow has a slight delay this may not be true immediately
|
||||
// after that call.
|
||||
return ([[NSRunningApplication currentApplication] activationPolicy] == NSApplicationActivationPolicyRegular);
|
||||
}
|
||||
|
||||
void Browser::DockShow() {
|
||||
BOOL active = [[NSRunningApplication currentApplication] isActive];
|
||||
ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue