changeset 362:d8f9efc21477

6691328: DragSourceContext returns unexpected cursor Summary: make the code to be executed if other options don't suit Reviewed-by: dcherepanov
author dav
date Thu, 29 May 2008 13:48:51 +0400
parents addb8a23ad24
children bb99fb855bdc 80a4ace80c31
files src/share/classes/java/awt/dnd/DragSourceContext.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/dnd/DragSourceContext.java	Fri May 23 02:29:12 2008 -0700
+++ b/src/share/classes/java/awt/dnd/DragSourceContext.java	Thu May 29 13:48:51 2008 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -485,7 +485,6 @@
 
         Cursor c = null;
 
-        targetAct = DnDConstants.ACTION_NONE;
         switch (status) {
             case ENTER:
             case OVER:
@@ -507,6 +506,10 @@
                     else
                         c = DragSource.DefaultCopyDrop;
                 }
+                break;
+            default:
+                targetAct = DnDConstants.ACTION_NONE;
+
         }
 
         setCursorImpl(c);