mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:50:48 +00:00
Suppress app icon window by simply not ordering it in.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28831 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
027f6c59ab
commit
817142915c
4 changed files with 37 additions and 19 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2009-10-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* 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 <sheldon@westnet.net.au>
|
2009-10-17 Sheldon Gill <sheldon@westnet.net.au>
|
||||||
|
|
||||||
* Source/NSApplication.m: centralise GSGuiBundle() routine
|
* Source/NSApplication.m: centralise GSGuiBundle() routine
|
||||||
|
|
|
@ -431,18 +431,6 @@ NSApplication *NSApp = nil;
|
||||||
return YES;
|
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
|
- (void) _initDefaults
|
||||||
{
|
{
|
||||||
[super _initDefaults];
|
[super _initDefaults];
|
||||||
|
@ -987,11 +975,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
[self setApplicationIconImage: image];
|
[self setApplicationIconImage: image];
|
||||||
|
[self _appIconInit];
|
||||||
if (![defs boolForKey: @"GSSuppressAppIcon"])
|
|
||||||
{
|
|
||||||
[self _appIconInit];
|
|
||||||
}
|
|
||||||
|
|
||||||
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
|
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
|
||||||
if (mainModelFile != nil && [mainModelFile isEqual: @""] == NO)
|
if (mainModelFile != nil && [mainModelFile isEqual: @""] == NO)
|
||||||
|
@ -1240,6 +1224,12 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
|
|
||||||
_app_is_active = YES;
|
_app_is_active = YES;
|
||||||
|
|
||||||
|
if ([[NSUserDefaults standardUserDefaults]
|
||||||
|
boolForKey: @"GSSuppressAppIcon"])
|
||||||
|
{
|
||||||
|
[_app_icon_window orderOut: self];
|
||||||
|
}
|
||||||
|
|
||||||
/* Make sure to calculate count after the notification, since
|
/* Make sure to calculate count after the notification, since
|
||||||
inactive status might be changed by a notifiee. */
|
inactive status might be changed by a notifiee. */
|
||||||
count = [_inactive count];
|
count = [_inactive count];
|
||||||
|
@ -2355,6 +2345,12 @@ image.</p><p>See Also: -applicationIconImage</p>
|
||||||
_app_is_hidden = YES;
|
_app_is_hidden = YES;
|
||||||
[[_app_icon_window contentView] setNeedsDisplay: 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
|
* On hiding we also deactivate the application which will make the menus
|
||||||
* go away too.
|
* go away too.
|
||||||
|
@ -3627,7 +3623,13 @@ struct _DelegateWrapper
|
||||||
[_app_icon_window setContentView: iv];
|
[_app_icon_window setContentView: iv];
|
||||||
RELEASE(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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -691,7 +691,7 @@ static const char *eventTypes[] = {
|
||||||
default:
|
default:
|
||||||
return [NSString stringWithFormat:
|
return [NSString stringWithFormat:
|
||||||
@"NSEvent: eventType = UNKNOWN!, point = { %f, %f }, modifiers = %u,"
|
@"NSEvent: eventType = UNKNOWN!, point = { %f, %f }, modifiers = %u,"
|
||||||
@" time = %f, window = %d"
|
@" time = %f, window = %d",
|
||||||
location_point.x, location_point.y,
|
location_point.x, location_point.y,
|
||||||
modifier_flags, event_time, window_num];
|
modifier_flags, event_time, window_num];
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1647,6 +1647,12 @@ many times.
|
||||||
GSDisplayServer *srv = GSServerForWindow(self);
|
GSDisplayServer *srv = GSServerForWindow(self);
|
||||||
BOOL display = NO;
|
BOOL display = NO;
|
||||||
|
|
||||||
|
if (YES == [[NSUserDefaults standardUserDefaults]
|
||||||
|
boolForKey: @"GSBackgroundApp"])
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (place == NSWindowOut)
|
if (place == NSWindowOut)
|
||||||
{
|
{
|
||||||
if (_windowNum == 0)
|
if (_windowNum == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue