discuss-gnustep
[Top][All Lists]
Advanced

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

root window


From: Enrico Sersale
Subject: root window
Date: Wed, 21 Feb 2001 15:02:41 +0200 (EET)

I've added to GWorkspace a root window to use it as a big shelf and to
put a recycler on it.

Added also a preferences win where you can choose a background color or a
background image...

But, now, my problem is that I can't get dnd working with this window.

I'm doing this:

- (id)init
{       
  self = [super initWithContentRect: [[NSScreen mainScreen] frame]
                          styleMask: NSBorderlessWindowMask
                            backing: NSBackingStoreRetained 
                              defer: NO];
    if(self) 
      {
     [self setReleasedWhenClosed: NO]; 
     backView = [BackView new];

// "backView" register itself for the NSFilenamesPboardType DraggedTypes

     [self setContentView: backView];
      }
  
  return self;
}

- (void)activate
{
  NSGraphicsContext *context = [NSGraphicsContext currentContext];
  [context DPSsetwindowlevel: NSDesktopWindowLevel : [self windowNumber]];
  [self orderFront: nil];
}

- (void)deactivate
{
  [self orderOut: nil];
}

Well, if the window is created, displayed and then odered out, it gets the
dnd events always, even if an other window is at the mouse location!

If I display it dnd stops to work. 

Any suggestion?

Enrico




reply via email to

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