mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 18:10:38 +00:00
Patch by German Arias <german@xelalug.org>.
Allows to get icon placement from separate process. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29153 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a2c57254c5
commit
138604f74e
6 changed files with 214 additions and 9 deletions
|
@ -82,6 +82,7 @@
|
|||
#include "GNUstepGUI/GSDisplayServer.h"
|
||||
#include "GSGuiPrivate.h"
|
||||
#include "GSToolTips.h"
|
||||
#include "GSIconManager.h"
|
||||
#include "GSWindowDecorationView.h"
|
||||
#include "NSToolbarFrameworkPrivate.h"
|
||||
|
||||
|
@ -386,7 +387,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
{
|
||||
NSSize iconSize, retSize;
|
||||
|
||||
iconSize = [GSCurrentServer() iconSize];
|
||||
iconSize = GSGetIconSize();
|
||||
retSize.width = imageSize.width * iconSize.width / 64;
|
||||
retSize.height = imageSize.height * iconSize.height / 64;
|
||||
return retSize;
|
||||
|
@ -399,7 +400,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
NSImage *tileImage;
|
||||
NSSize iconSize;
|
||||
|
||||
iconSize = [GSCurrentServer() iconSize];
|
||||
iconSize = GSGetIconSize();
|
||||
|
||||
tileImage = [[GSCurrentServer() iconTileImage] copy];
|
||||
[tileImage setScalesWhenResized: YES];
|
||||
|
@ -424,7 +425,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
|
||||
- (void) drawRect: (NSRect)rect
|
||||
{
|
||||
NSSize iconSize = [GSCurrentServer() iconSize];
|
||||
NSSize iconSize = GSGetIconSize();
|
||||
|
||||
[tileCell drawWithFrame: NSMakeRect(0, 0, iconSize.width, iconSize.height)
|
||||
inView: self];
|
||||
|
@ -2663,6 +2664,13 @@ resetCursorRectsForView(NSView *theView)
|
|||
_f.has_opened = NO;
|
||||
[NSApp removeWindowsItem: self];
|
||||
[self orderOut: self];
|
||||
|
||||
if (_f.is_miniaturized == YES)
|
||||
{
|
||||
NSWindow *mini = GSWindowWithNumber(_counterpart);
|
||||
GSRemoveIcon(mini);
|
||||
}
|
||||
|
||||
RELEASE(pool);
|
||||
_f.has_closed = YES;
|
||||
RELEASE(self);
|
||||
|
@ -2711,6 +2719,7 @@ resetCursorRectsForView(NSView *theView)
|
|||
{
|
||||
NSWindow *mini = GSWindowWithNumber(_counterpart);
|
||||
|
||||
GSRemoveIcon(mini);
|
||||
[mini orderOut: self];
|
||||
}
|
||||
|
||||
|
@ -2808,7 +2817,10 @@ resetCursorRectsForView(NSView *theView)
|
|||
*/
|
||||
if (_counterpart != 0)
|
||||
{
|
||||
NSRect iconRect;
|
||||
NSWindow *mini = GSWindowWithNumber(_counterpart);
|
||||
iconRect = GSGetIconFrame(mini);
|
||||
[mini setFrame: iconRect display: YES];
|
||||
[mini orderFront: self];
|
||||
}
|
||||
[nc postNotificationName: NSWindowDidMiniaturizeNotification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue