diff --git a/ChangeLog b/ChangeLog
index e3adc908a..32037af1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-17 Richard Frith-Macdonald
+
+ * Source/NSApplication.m: Make GSSuppressAppIconhide the icon window
+ (leave it ordered out) rather than making it not exist at all.
+ Add new default GSBackgroundApp for an application which should not
+ display the window at all.
+ * Soure/NSWindow.m: Don't order any windows in if this is a background
+ application.
+ * Source/NSEvent.m: fix missing commaa causing comple fail.
+
2009-10-17 Sheldon Gill
* Source/NSApplication.m: centralise GSGuiBundle() routine
diff --git a/Source/NSApplication.m b/Source/NSApplication.m
index 55ffc86a9..ff229cad9 100644
--- a/Source/NSApplication.m
+++ b/Source/NSApplication.m
@@ -431,18 +431,6 @@ NSApplication *NSApp = nil;
return YES;
}
-- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
-{
- if ((place == NSWindowOut) && [NSApp isRunning])
- {
- NSLog (@"Argh - icon window ordered out");
- }
- else
- {
- [super orderWindow: place relativeTo: otherWin];
- }
-}
-
- (void) _initDefaults
{
[super _initDefaults];
@@ -987,11 +975,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
}
[self setApplicationIconImage: image];
-
- if (![defs boolForKey: @"GSSuppressAppIcon"])
- {
- [self _appIconInit];
- }
+ [self _appIconInit];
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
if (mainModelFile != nil && [mainModelFile isEqual: @""] == NO)
@@ -1240,6 +1224,12 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
_app_is_active = YES;
+ if ([[NSUserDefaults standardUserDefaults]
+ boolForKey: @"GSSuppressAppIcon"])
+ {
+ [_app_icon_window orderOut: self];
+ }
+
/* Make sure to calculate count after the notification, since
inactive status might be changed by a notifiee. */
count = [_inactive count];
@@ -2355,6 +2345,12 @@ image.
See Also: -applicationIconImage
_app_is_hidden = YES;
[[_app_icon_window contentView] setNeedsDisplay: YES];
+ if ([[NSUserDefaults standardUserDefaults]
+ boolForKey: @"GSSuppressAppIcon"])
+ {
+ [_app_icon_window orderFrontRegardless];
+ }
+
/*
* On hiding we also deactivate the application which will make the menus
* go away too.
@@ -3627,7 +3623,13 @@ struct _DelegateWrapper
[_app_icon_window setContentView: iv];
RELEASE(iv);
- [_app_icon_window orderFrontRegardless];
+ if (NO == [[NSUserDefaults standardUserDefaults]
+ boolForKey: @"GSSuppressAppIcon"])
+ {
+ /* The icon window is not suppressed ... display it.
+ */
+ [_app_icon_window orderFrontRegardless];
+ }
return self;
}
diff --git a/Source/NSEvent.m b/Source/NSEvent.m
index fbf98038d..5831340a0 100644
--- a/Source/NSEvent.m
+++ b/Source/NSEvent.m
@@ -691,7 +691,7 @@ static const char *eventTypes[] = {
default:
return [NSString stringWithFormat:
@"NSEvent: eventType = UNKNOWN!, point = { %f, %f }, modifiers = %u,"
- @" time = %f, window = %d"
+ @" time = %f, window = %d",
location_point.x, location_point.y,
modifier_flags, event_time, window_num];
break;
diff --git a/Source/NSWindow.m b/Source/NSWindow.m
index 3c690d5d4..c4b7431e5 100644
--- a/Source/NSWindow.m
+++ b/Source/NSWindow.m
@@ -1647,6 +1647,12 @@ many times.
GSDisplayServer *srv = GSServerForWindow(self);
BOOL display = NO;
+ if (YES == [[NSUserDefaults standardUserDefaults]
+ boolForKey: @"GSBackgroundApp"])
+ {
+ return;
+ }
+
if (place == NSWindowOut)
{
if (_windowNum == 0)