DnD cleanups and fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21028 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-04-01 14:10:39 +00:00
parent 960ae57b10
commit b9c4cc1832
6 changed files with 125 additions and 61 deletions

View file

@ -220,8 +220,17 @@ static Class imageCellClass;
if ([pboard setData: [anImage TIFFRepresentation]
forType: NSTIFFPboardType])
{
NSSize s;
NSPoint p;
// Center the image on the mouse position ... is this right?
s = [anImage size];
p = [theEvent locationInWindow];
p = [self convertPoint: p fromView: nil];
p.x -= s.width/2;
p.y -= s.width/2;
[_window dragImage: anImage
at: [theEvent locationInWindow]
at: p
offset: NSMakeSize(0, 0)
event: theEvent
pasteboard: pboard