diff --git a/Source/CandidateUI/VTCandidateController.m b/Source/CandidateUI/VTCandidateController.m index 44e97db5..da5ab8d8 100644 --- a/Source/CandidateUI/VTCandidateController.m +++ b/Source/CandidateUI/VTCandidateController.m @@ -138,10 +138,10 @@ - (void)setVisible:(BOOL)visible { if (visible) { - [[self window] orderFront:self]; + [[self window] performSelector:@selector(orderFront:) withObject:self afterDelay:0.0]; } else { - [[self window] orderOut:self]; + [[self window] performSelector:@selector(orderOut:) withObject:self afterDelay:0.0]; } } diff --git a/Source/CandidateUI/VTHorizontalCandidateController.m b/Source/CandidateUI/VTHorizontalCandidateController.m index b8b97665..f69affdd 100644 --- a/Source/CandidateUI/VTHorizontalCandidateController.m +++ b/Source/CandidateUI/VTHorizontalCandidateController.m @@ -52,7 +52,7 @@ NSUInteger styleMask = NSBorderlessWindowMask | NSNonactivatingPanelMask; NSPanel *panel = [[[NSPanel alloc] initWithContentRect:contentRect styleMask:styleMask backing:NSBackingStoreBuffered defer:NO] autorelease]; - [panel setLevel:CGShieldingWindowLevel() + 1]; + [panel setLevel:kCGPopUpMenuWindowLevel]; [panel setHasShadow:YES]; self = [self initWithWindow:panel]; @@ -229,7 +229,7 @@ frameRect.size = newSize; frameRect.origin = NSMakePoint(topLeftPoint.x, topLeftPoint.y - frameRect.size.height); - [[self window] setFrame:frameRect display:YES]; + [[self window] setFrame:frameRect display:NO]; [_candidateView setNeedsDisplay:YES]; } diff --git a/Source/CandidateUI/VTVerticalCandidateController.m b/Source/CandidateUI/VTVerticalCandidateController.m index 7684806d..ba912e38 100644 --- a/Source/CandidateUI/VTVerticalCandidateController.m +++ b/Source/CandidateUI/VTVerticalCandidateController.m @@ -60,7 +60,7 @@ static const CGFloat kCandidateTextLeftMargin = 8.0; NSUInteger styleMask = NSBorderlessWindowMask | NSNonactivatingPanelMask; NSPanel *panel = [[[NSPanel alloc] initWithContentRect:contentRect styleMask:styleMask backing:NSBackingStoreBuffered defer:NO] autorelease]; - [panel setLevel:CGShieldingWindowLevel() + 1]; + [panel setLevel:kCGPopUpMenuWindowLevel]; [panel setHasShadow:YES]; self = [self initWithWindow:panel]; @@ -396,6 +396,6 @@ static const CGFloat kCandidateTextLeftMargin = 8.0; [_keyLabelStripView setFrame:NSMakeRect(0.0, 0.0, stripWidth, windowHeight)]; [_scrollView setFrame:NSMakeRect(stripWidth + 1.0, 0.0, tableViewStartWidth, windowHeight)]; - [[self window] setFrame:frameRect display:YES]; + [[self window] setFrame:frameRect display:NO]; } @end