aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <kbrussel@alum.mit.edu>2005-09-07 16:42:31 +0000
committerKenneth Russel <kbrussel@alum.mit.edu>2005-09-07 16:42:31 +0000
commit722224438638b884b9a2d466ddc104a4cae459e3 (patch)
tree50274a30bd896c87384e99957fc18c3096b4cd58 /src
parenta8bce4d8fa9b5cd3f60b84b9e9f976d71ec17085 (diff)
Added back in variant of zero width / height check as workaround for
apparent problems on some 10.3 installations git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@364 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rw-r--r--src/native/jogl/MacOSXWindowSystemInterface.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/native/jogl/MacOSXWindowSystemInterface.m b/src/native/jogl/MacOSXWindowSystemInterface.m
index d74c083d6..125f6abb4 100644
--- a/src/native/jogl/MacOSXWindowSystemInterface.m
+++ b/src/native/jogl/MacOSXWindowSystemInterface.m
@@ -43,7 +43,19 @@ void* createContext(void* shareContext, void* view,
NSView *nsView = (NSView*)view;
if (nsView != NULL) {
+ Bool viewReady = true;
+
if ([nsView lockFocusIfCanDraw] == NO) {
+ viewReady = false;
+ } else {
+ NSRect frame = [nsView frame];
+ if ((frame.size.width == 0) || (frame.size.height == 0)) {
+ [nsView unlockFocus];
+ viewReady = false;
+ }
+ }
+
+ if (!viewReady) {
if (viewNotReady != NULL) {
*viewNotReady = 1;
}