From 35fa76064c06fdaa3edf2b37acb0b8767f5cb035 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Thu, 20 Aug 2009 18:58:00 -0700 Subject: [PATCH] CPWindow centering --- AppKit/CPWindow/CPWindow.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index e851f38ba..bb90723e4 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1186,8 +1186,8 @@ CPTexturedBackgroundWindowMask - (void)center { var size = [self frame].size, - containerSize = [_platformWindow contentBounds].size; - + containerSize = [CPPlatform isBrowser] ? [_platformWindow contentBounds].size : [[self screen] visibleFrame].size; + [self setFrameOrigin:CGPointMake((containerSize.width - size.width) / 2.0, (containerSize.height - size.height) / 2.0)]; }