[Top][All Lists]

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

Re: RE: root window

From: Enrico Sersale
Subject: Re: RE: root window
Date: Fri, 2 Feb 2001 17:38:30 +0200 (EET)

On Fri, 2 Feb 2001, Philippe C.D. Robert wrote:

> > Well, I tried this and I've got a Window*.
> > Now the problem is: how to have a NSWindow*.
> You cannot do that very easily AFAIK (but maybe I am wrong here...)  
> - perhaps you explain a little bit what you want to do with it?
> cheers, Phil

I want to create a kind of big shelf as that that is created by the
openstep Fiend.app.

I want to do this also because I need a place where to put a Recycler; it
can't take place on the GWorkspace Fiend because I think it must be in a
fixed position. 

Moreover the GWorkspace Fiend can have many levels, and this complicates
the thing... 

Neither the Window Maker Dock is a solution because, even if it would be
possible to put the recycler on it, I don't want Window Maker be needed to
run GWorkspace.

Anyway, after the previous mail, I've taken a look at the openstep Fiend
sources and I've seen that its big shelf is only a normal window keeped at
the lovest level.

They do something like this:

  id  shelfWindow;

  shelfWindow = [[Window allocFromZone:[self zone]]
            style:NX_TOKENSTYLE backing:NX_BUFFERED 
            buttonMask:0 defer:NO];


   PSsetwindowlevel(-2147483647, [shelfWindow windowNum]);
   [shelfWindow display];
   [shelfWindow orderBack:self];


So, I've tried:

  NSWindow *rootWin = [[NSWindow alloc] 
          initWithContentRect: [[NSScreen mainScreen] frame] 
                    styleMask: NSBorderlessWindowMask
                      backing: NSBackingStoreRetained defer: NO];

  [[NSGraphicsContext currentContext] 
                DPSsetwindowlevel: -2147483647 : [rootWin windowNumber]];

  [rootWin display];
  [rootWin orderBack: self];

This works and creates a big *root* window where you can put wath you

But, now, the problem is that this window covers all the other windows
previously open, comprised the Window Maker Dock, the AppIcons, etc.


reply via email to

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