diff --git a/ChangeLog b/ChangeLog index cd0e5f118..a08e3efbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-27 Adam Fedor + + * Source/NSApplication.m ([NSApplication -init]): Create our + NSGraphicsContext here (moved from backend initialization) - much + more appealing. + Thu Feb 28 14:19:00 2002 Nicola Pero * Headers/gnustep/gui/NSText.h: Added the special key enum diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 53051cb60..2d7eaa975 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -504,12 +504,6 @@ static NSCell* tileCell = nil; { CREATE_AUTORELEASE_POOL (_app_init_pool); - /* Initialize the backend here. This is equivalent to connecting to - our window server, so if someone wants to query information that might - require the backend, they just need to instantiate a sharedApplication - */ - initialize_gnustep_backend(); - self = [super init]; NSApp = self; if (NSApp == nil) @@ -522,7 +516,19 @@ static NSCell* tileCell = nil; NSDebugLog(@"Begin of NSApplication -init\n"); - _default_context = GSCurrentContext(); + /* Initialize the backend here. */ + initialize_gnustep_backend(); + + /* Create our context. This is equivalent to connecting to + our window server, so if someone wants to query information that might + require the backend, they just need to instantiate a sharedApplication + */ + _default_context = [NSGraphicsContext graphicsContextWithAttributes: nil]; + [NSGraphicsContext setCurrentContext: _default_context]; + + /* Initialize font manager */ + [NSFontManager sharedFontManager]; + _hidden = [[NSMutableArray alloc] init]; _inactive = [[NSMutableArray alloc] init]; _unhide_on_activation = YES;