mirror of https://github.com/BOINC/boinc.git
MGR: eliminate almost all overhead from my commit a8cc13f
unless assistive software is in use
This commit is contained in:
parent
6aab68fdc9
commit
dcc0afaaa0
|
@ -1047,6 +1047,8 @@ static void wxRectToNSRect(wxRect &wxr, NSRect &nsr) {
|
||||||
// is somewhere in the caller chain.
|
// is somewhere in the caller chain.
|
||||||
// I wish I could find a more efficient way to do this.
|
// I wish I could find a more efficient way to do this.
|
||||||
//
|
//
|
||||||
|
static BOOL AccessibilityEnabled = false;
|
||||||
|
|
||||||
- (NSView *)hitTest:(NSPoint)aPoint {
|
- (NSView *)hitTest:(NSPoint)aPoint {
|
||||||
// [NSThread callStackSymbols] is not available in OS 10.5, so
|
// [NSThread callStackSymbols] is not available in OS 10.5, so
|
||||||
// BOINC does not fully implement accessibility under OS 10.5.
|
// BOINC does not fully implement accessibility under OS 10.5.
|
||||||
|
@ -1073,7 +1075,8 @@ static void wxRectToNSRect(wxRect &wxr, NSRect &nsr) {
|
||||||
return [super hitTest:aPoint]; // Point is not within our rect
|
return [super hitTest:aPoint]; // Point is not within our rect
|
||||||
}
|
}
|
||||||
|
|
||||||
// NSArray *theStack = [NSThread callStackSymbols];
|
if (AccessibilityEnabled) {
|
||||||
|
// NSArray *theStack = [NSThread callStackSymbols];
|
||||||
NSArray *theStack = [ NSThread performSelector:@selector(callStackSymbols) ];
|
NSArray *theStack = [ NSThread performSelector:@selector(callStackSymbols) ];
|
||||||
|
|
||||||
int limit = [ theStack count ];
|
int limit = [ theStack count ];
|
||||||
|
@ -1094,12 +1097,14 @@ static void wxRectToNSRect(wxRect &wxr, NSRect &nsr) {
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
} while (i < 15);
|
} while (i < 15);
|
||||||
|
}
|
||||||
|
|
||||||
return [super hitTest:aPoint]; // Not an accessibility call
|
return [super hitTest:aPoint]; // Not an accessibility call
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (BOOL)accessibilityIsIgnored {
|
- (BOOL)accessibilityIsIgnored {
|
||||||
|
AccessibilityEnabled = true;
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue