harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r573554 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ToolkitImpl.java
Date Fri, 07 Sep 2007 11:49:36 GMT
Author: ayza
Date: Fri Sep  7 04:49:36 2007
New Revision: 573554

URL: http://svn.apache.org/viewvc?rev=573554&view=rev
Log:
Patch from HARMONY-4656 ([classlib][awt] System ClipBoard is not initialized well in Linux)
was applied

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ToolkitImpl.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ToolkitImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ToolkitImpl.java?rev=573554&r1=573553&r2=573554&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ToolkitImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ToolkitImpl.java
Fri Sep  7 04:49:36 2007
@@ -35,6 +35,7 @@
 import org.apache.harmony.awt.datatransfer.DTK;
 import org.apache.harmony.awt.gl.*;
 import org.apache.harmony.awt.gl.image.*;
+import java.awt.datatransfer.StringSelection;
 
 class ToolkitImpl extends Toolkit {
     static final Hashtable<Serializable, Image> imageCache = new Hashtable<Serializable,
Image>();
@@ -495,6 +496,9 @@
             }
             if (systemClipboard == null) {
                 systemClipboard = DTK.getDTK().getNativeClipboard();
+            }
+            if (systemClipboard.getContents(null) == null) {
+                systemClipboard.setContents ( new StringSelection("") , null);
             }
             return systemClipboard;
         } finally {



Mime
View raw message