Make OakKeyEquivalentView opaque

This is a minor performance advantage and prevents mouse-down events from moving the window (when the control is used in a textured window).
This commit is contained in:
Allan Odgaard
2014-11-05 00:20:40 +01:00
parent 32d40edfcf
commit ea1fb48286

View File

@@ -168,6 +168,11 @@ static NSString* const kRecordingPlaceholderString = @"…";
return self.showClearButton && [anEvent type] == NSLeftMouseDown && NSMouseInRect([self convertPoint:[anEvent locationInWindow] fromView:nil], _clearButtonRect, [self isFlipped]);
}
- (BOOL)isOpaque
{
return YES;
}
- (BOOL)acceptsFirstMouse:(NSEvent*)anEvent
{
return YES;