diff --git a/ChangeLog b/ChangeLog index b46cda885..eb49f52d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-06-19 Fred Kiefer + + * Headers/Additions/GNUstepGUI/GSDisplayServer.h: Added new method + (-findWindowAt:windowRef:excluding:). + * Source/GSDisplayServer.m: Implemented (-dragInfo) with + GSDragView. + * Source/GNUmakefile: Added GSDragView.h. + * Source/GSDragView.m: Implemented + (-_windowAcceptingDnDunder:windowRef:) with new GSDisplayServer + method. + 2004-06-17 Fred Kiefer * Source/NSComboBoxCell.m: buttonCellFrameFromRect(), diff --git a/Headers/Additions/GNUstepGUI/GSDisplayServer.h b/Headers/Additions/GNUstepGUI/GSDisplayServer.h index 0278a486b..26148f941 100644 --- a/Headers/Additions/GNUstepGUI/GSDisplayServer.h +++ b/Headers/Additions/GNUstepGUI/GSDisplayServer.h @@ -82,6 +82,10 @@ APPKIT_EXPORT NSString * GSScreenNumber; - (id ) dragInfo; - (BOOL) slideImage: (NSImage*)image from: (NSPoint)from to: (NSPoint)to; - (void) restrictWindow: (int)win toImage: (NSImage*)image; +- (int) findWindowAt: (NSPoint)screenLocation + windowRef: (int*)windowRef + excluding: (int)win; + /* Screen information */ - (NSSize) resolutionForScreen: (int)screen; diff --git a/Source/GNUmakefile b/Source/GNUmakefile index db039b5dc..03771d0cf 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -354,6 +354,7 @@ GSHorizontalTypesetter.h \ GSToolbar.h \ GSToolbarView.h \ GSNibCompatibility.h \ +GSDragView.h \ GSTitleView.h libgnustep-gui_HEADER_FILES = ${GUI_HEADERS} diff --git a/Source/GSDisplayServer.m b/Source/GSDisplayServer.m index 3689ae187..0c31fe16f 100644 --- a/Source/GSDisplayServer.m +++ b/Source/GSDisplayServer.m @@ -35,6 +35,7 @@ #include "AppKit/NSImage.h" #include "AppKit/NSWindow.h" #include "GNUstepGUI/GSDisplayServer.h" +#include "GNUstepGUI/GSDragView.h" #include "GSSlideView.h" @@ -385,8 +386,7 @@ GSCurrentServer(void) protocol. */ - (id ) dragInfo { - [self subclassResponsibility: _cmd]; - return nil; + return [GSDragView sharedDragView]; } - (BOOL) slideImage: (NSImage*)image from: (NSPoint)from to: (NSPoint)to @@ -399,6 +399,14 @@ GSCurrentServer(void) [self subclassResponsibility: _cmd]; } +- (int) findWindowAt: (NSPoint)screenLocation + windowRef: (int*)windowRef + excluding: (int)win +{ + [self subclassResponsibility: _cmd]; + return 0; +} + /* Screen information */ /** Retuns the resolution, in points, for the indicated screen of the display. */ diff --git a/Source/GSDragView.m b/Source/GSDragView.m index 1dcd80236..f7eb2df80 100644 --- a/Source/GSDragView.m +++ b/Source/GSDragView.m @@ -957,8 +957,14 @@ static GSDragView *sharedDragView = nil; - (NSWindow*) _windowAcceptingDnDunder: (NSPoint)mouseLocation windowRef: (int*)mouseWindowRef { + int win; + *mouseWindowRef = 0; - return nil; + win = [GSServerForWindow(_window) findWindowAt: mouseLocation + windowRef: mouseWindowRef + excluding: [_window windowNumber]]; + + return GSWindowWithNumber(win); } @end