mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 01:01:13 +00:00
Show dot on icon for hidden apps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19202 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fc22065400
commit
e8ccd057bd
2 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-04-27 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSApplication.m ([NSAppIconView -drawRect:]): Draw dot when
|
||||||
|
hidden.
|
||||||
|
([NSAppIconView -setImage:]): Use -drawRect:
|
||||||
|
(-hide:,-unhideWithoutActivation:): Mark icon view as needing display.
|
||||||
|
(based on patch from Rafael Herzog).
|
||||||
|
|
||||||
2004-04-27 Quentin mathe <qmathe@club-internet.fr>
|
2004-04-27 Quentin mathe <qmathe@club-internet.fr>
|
||||||
|
|
||||||
* Source/NSToolbarItem.m: Modified to have the action message sent by
|
* Source/NSToolbarItem.m: Modified to have the action message sent by
|
||||||
|
|
|
@ -381,6 +381,12 @@ static NSCell* tileCell = nil;
|
||||||
{
|
{
|
||||||
[tileCell drawWithFrame: NSMakeRect(0,0,64,64) inView: self];
|
[tileCell drawWithFrame: NSMakeRect(0,0,64,64) inView: self];
|
||||||
[dragCell drawWithFrame: NSMakeRect(8,8,48,48) inView: self];
|
[dragCell drawWithFrame: NSMakeRect(8,8,48,48) inView: self];
|
||||||
|
if ([NSApp isHidden])
|
||||||
|
{
|
||||||
|
NSRectEdge mySides[] = {NSMinXEdge, NSMinYEdge, NSMaxXEdge, NSMaxYEdge};
|
||||||
|
float myGrays[] = {NSBlack, NSWhite, NSWhite, NSBlack};
|
||||||
|
NSDrawTiledRects(NSMakeRect(4, 4, 3, 2), rect, mySides, myGrays, 4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithFrame: (NSRect)frame
|
- (id) initWithFrame: (NSRect)frame
|
||||||
|
@ -477,8 +483,7 @@ static NSCell* tileCell = nil;
|
||||||
|
|
||||||
if ([self lockFocusIfCanDraw])
|
if ([self lockFocusIfCanDraw])
|
||||||
{
|
{
|
||||||
[tileCell drawWithFrame: NSMakeRect(0,0,64,64) inView: self];
|
[self drawRect: NSMakeRect(0,0,64,64)];
|
||||||
[dragCell drawWithFrame: NSMakeRect(8,8,48,48) inView: self];
|
|
||||||
[self unlockFocus];
|
[self unlockFocus];
|
||||||
[_window flushWindow];
|
[_window flushWindow];
|
||||||
}
|
}
|
||||||
|
@ -1859,6 +1864,7 @@ image.
|
||||||
[win orderOut: self];
|
[win orderOut: self];
|
||||||
}
|
}
|
||||||
_app_is_hidden = YES;
|
_app_is_hidden = YES;
|
||||||
|
[[_app_icon_window contentView] setNeedsDisplay: YES];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On hiding we also deactivate the application which will make the menus
|
* On hiding we also deactivate the application which will make the menus
|
||||||
|
@ -1920,6 +1926,7 @@ image.
|
||||||
[_hidden_key makeKeyAndOrderFront: self];
|
[_hidden_key makeKeyAndOrderFront: self];
|
||||||
_hidden_key = nil;
|
_hidden_key = nil;
|
||||||
}
|
}
|
||||||
|
[[_app_icon_window contentView] setNeedsDisplay: YES];
|
||||||
|
|
||||||
[nc postNotificationName: NSApplicationDidUnhideNotification
|
[nc postNotificationName: NSApplicationDidUnhideNotification
|
||||||
object: self];
|
object: self];
|
||||||
|
|
Loading…
Reference in a new issue