diff --git a/ChangeLog b/ChangeLog index de81405cc..d53812e5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-26 Eric Wasylishen + + * Source/NSView.m (-setHidden:): Fix un-hiding of hidden views, loaded + from nib's, with subviews. The subview coordinates just need to be + invalidated when the view is unhidden. + 2010-01-24 03:07-EST Gregory John Casamento * Source/NSWindow.m: Uncomment updateMenu:.. method call in diff --git a/Source/GSThemeDrawing.m b/Source/GSThemeDrawing.m index 9c85dea81..3be52eb8d 100644 --- a/Source/GSThemeDrawing.m +++ b/Source/GSThemeDrawing.m @@ -28,6 +28,7 @@ #import "GSThemePrivate.h" +#import "AppKit/NSApplication.h" #import "AppKit/NSAttributedString.h" #import "AppKit/NSBezierPath.h" #import "AppKit/NSButtonCell.h" @@ -210,6 +211,11 @@ NSColor *c; c = [[view window] backgroundColor]; + + if ([[view window] isMainWindow] && + [[NSApplication sharedApplication] isActive]) + c = [NSColor whiteColor]; + [c set]; NSRectFill (frame); } diff --git a/Source/NSView.m b/Source/NSView.m index a0b06c63e..f167cd8fa 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -2801,6 +2801,18 @@ in the main thread. [GSDisplayServer addDragTypes: t toWindow: _window]; } } + if (_rFlags.has_subviews) + { + // The _visibleRect of subviews will be NSZeroRect, because when they + // were calculated in -[_rebuildCoordinates], they were intersected + // with the result of calling -[visibleRect] on the hidden superview, + // which returns NSZeroRect for hidden views. + // + // So, recalculate the subview coordinates now to make them correct. + + [_sub_views makeObjectsPerformSelector: + @selector(_invalidateCoordinates)]; + } } [self setNeedsDisplay: YES]; }