[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppIcon patch revisited

From: Frederic Stark
Subject: Re: AppIcon patch revisited
Date: Fri, 9 Feb 2001 16:11:31 +0100

> I was talking about the un-docked appicon, and the miniwindows  
(equivalent to X
> icons) ...
> once the appicon is dropped in the dock, different rules apply.
> I could be wrong ... but I think my NeXTstep documentation talked  
about using a
> windows
> miniwindow counterpart just like a normal window.

I don't want to start war, but, to the best of my knowledge, it was  
not possible to put controls in those windows (they would draw  
themselves, but would not answer correctly to events. I spent nights  
trying :-) ) The problem was that the ordering/drag was performed by  
the window server itself (via postscript routines included un  
/usr/lib/NeXTstep/windowPackage.ps, so the applications icons did not  
had any problem beeing moved around when the app was frozen).

I just booted my old laptop for a few checks. In OPENSTEP4.x, the  
[NSApplication appIcon] API disapeared, along with [NSWindow  
miniWindow]. The only API left is [NSApplication  
setApplicationIconImage:] and [NSWindow setMiniwindowImage:].


NS[2-3].x: You could get the NSWindow for the mini windows. You  
could add views to them, but those views would not respond correctly  
to events. Worked fine for drop, IIRC.

OS4.x: You could not even get the mini windows via official API.

As a last test, I executed this code on a Mac OS X Server:

#import "Controller.h"

@implementation Controller

- (void)hack:(NSWindow *)aWindow
{       //[[aWindow contentView] addSubview:[[[NSButton alloc] init]  
        [aWindow setContentView:[[[NSButton alloc] init] autorelease]];
        [aWindow display];
        [aWindow flushWindow];
        NSLog( @"HACK" );

- (void)tryHackWindow:sender
{       int i;

        for (i=0;i!=100;i++)
        {       NSWindow *theWindow = [NSApp windowWithWindowNumber:i];
                if (theWindow)
                {       NSLog( @"%d address@hidden", i, NSStringFromRect(  
[theWindow frame] ) );
                        if (NSWidth( [theWindow frame] )==64 &&  
NSHeight( [theWindow frame] )==64)
                                [self hack:theWindow];


This search for 64x64 window and put a button inside them. This  
effectively put a button in mini windows of the application. But the  
button is not functional.

Mmm. Longer than I intended :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]