From da3a91a7bb224900d9cca6530ebbc6dfedd5d381 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Wed, 30 Jan 2013 16:53:44 +0100 Subject: [PATCH] Set root view to be opaque MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The idea was that e.g. a status bar may wish to not be opaque and rely on the window’s border to shine through. Unfortunately there is an issue where if the view is not opaque, the user can drag the entire window by clicking the scroll knobs (requires scrollbars to be configured to be visible and using a mouse, a trackpad doesn’t seem to cause the issue). --- Frameworks/DocumentWindow/src/ProjectLayoutView.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Frameworks/DocumentWindow/src/ProjectLayoutView.mm b/Frameworks/DocumentWindow/src/ProjectLayoutView.mm index f6e44be0..1a74a5a7 100644 --- a/Frameworks/DocumentWindow/src/ProjectLayoutView.mm +++ b/Frameworks/DocumentWindow/src/ProjectLayoutView.mm @@ -320,6 +320,11 @@ NSString* const kUserDefaultsHTMLOutputSizeKey = @"htmlOutputSize"; [self addCursorRect:[self htmlOutputResizeRect] cursor:[NSCursor resizeUpDownCursor]]; } +- (BOOL)isOpaque +{ + return YES; +} + - (NSView*)hitTest:(NSPoint)aPoint { if(NSMouseInRect([self convertPoint:aPoint fromView:[self superview]], [self fileBrowserResizeRect], [self isFlipped]))