United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4559047 Solaris & Linux do not set awt.multiClickInterval desktop property
JDK-4559047 : Solaris & Linux do not set awt.multiClickInterval desktop property

Details
Type:
Bug
Submit Date:
2001-12-07
Status:
Resolved
Updated Date:
2003-04-12
Project Name:
JDK
Resolved Date:
2002-08-08
Component:
client-libs
OS:
solaris_8
Sub-Component:
java.awt
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.2 (mantis)

Related Reports
Relates:

Sub Tasks

Description
The following code prints the double click time when run on Win32, but always prints null on Solaris and Linux:

import java.awt.*;

public class MultiClickTime {
    public static void main(String[] args) {
        System.out.println("awt.multiClickInterval: " + Toolkit.getDefaultToolkit().getDesktopProperty("awt.multiClickInterval"));
    }
}

See also bug 4229528.

                                    

Comments
EVALUATION

Fixing this is way easy.  It should go into hopper & tiger.
###@###.### 2001-12-07

Easy fix - the multiclick time is already stored in awt_multiclick_time in awt_MToolkit.c.  It's just a matter of pushing it up into a Desktop Property.
###@###.### 2002-06-10
                                     
2002-06-10
SUGGESTED FIX

------- awt_MToolkit.c -------
*** /tmp/dBFa4pS        Mon Jun 10 15:20:02 2002
--- awt_MToolkit.c      Fri Jun  7 17:02:57 2002
***************
*** 2865,2870 ****
--- 2865,2880 ----
      }
  }
  
+ /*
+  * Class:     sun_awt_motif_MToolkit
+  * Method:    getMulticlickTime
+  * Signature: ()I
+  */
+ JNIEXPORT jint JNICALL Java_sun_awt_motif_MToolkit_getMulticlickTime
+   (JNIEnv *env, jobject this) 
+ {
+     return awt_multiclick_time;
+ }
  
  /* 
   * Returns true if the current thread is privileged. Currently,

------- MToolkit.java -------
*** /tmp/dPCaOqS        Mon Jun 10 15:20:18 2002
--- MToolkit.java       Fri Jun  7 17:03:48 2002
***************
*** 557,562 ****
--- 557,565 ----
          return new Boolean(nativeDynamic);
      }
  
+     private native int getMulticlickTime();
+ 
+ 
      protected void initializeDesktopProperties() {
        desktopProperties.put("DnD.Autoscroll.initialDelay",     new Integer(50));
        desktopProperties.put("DnD.Autoscroll.interval",         new Integer(50));
***************
*** 568,573 ****
--- 571,579 ----
       * a wheel mouse or not.
       */
        //desktopProperties.put("awt.wheelMousePresent", new Boolean(false));
+ 
+     desktopProperties.put("awt.multiClickInterval",
+                           new Integer(getMulticlickTime()));
      }
  
      public RobotPeer createRobot(Robot target, GraphicsDevice screen) {

###@###.### 2002-06-10
                                     
2002-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis
mantis-b02

FIXED IN:
mantis
mantis-b02

INTEGRATED IN:
mantis
mantis-b02


                                     
2004-06-14



Hardware and Software, Engineered to Work Together