LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Tip: Java double-click speed annoyance solved! (http://www.linuxquestions.org/questions/slackware-14/tip-java-double-click-speed-annoyance-solved-693944/)

astrogeek 12-30-2008 05:30 PM

Tip: Java double-click speed annoyance solved!
 
I may be the only person who was unaware of this. If, please be kind :)

I am not a big java app user but the few I do use have long annoyed me because the double-click speed is different than that used by my other X apps, and always way too fast! This makes it difficult to navigate file dialogs, etc. I have looked for a solution off and on without success... until now!

I found a long explanation of the problem and why the fix is so obscure but I leave that to the scholarly among you and just offer the solution:

In ~/.Xdefaults (or other suitable X config read at X startup) add...
Code:

*multiClickTime: 400
...where the number is double click time in ms.

This only affects java apps and will not change your non-java click speeds.

Hope this helps someone as much as it helped me!

And Happy New Year to all!

archtoad6 01-02-2009 08:37 AM

Quote:

Originally Posted by astrogeek (Post 3392081)
I found a long explanation of the problem and why the fix is so obscure but ...

Thanks for the info., how about a link for those of us w/ time on our hands.

astrogeek 01-02-2009 11:47 AM

Here are a couple of good places to start...
 
Quote:

Originally Posted by archtoad6 (Post 3394514)
Thanks for the info., how about a link for those of us w/ time on our hands.

For a single coherent discussion on a Sun forum, look here.

Look for the post by Cruxic which includes the key:
Code:

After reading through the Java source code I think I found a solution:

Under the linux JVM

getDesktopProperty("awt.multiClickInterval")

maps roughly into a C function call to

XGetDefault(,,"multiClickTime")

The problem is that unless this value is explicitly defined it defaults to 200ms. The solution, then, is to define it.

And an old thread with reference to KDE/Gnome handling of the property, try here.

From those you can google for the property names multiClickInterval in AWT and other terms and get more clues, but these threads identify the cause and a cure. Longstanding annoyance!

larryhaja 01-02-2009 01:02 PM

astrogeek: In the second link in your second post they propose the workaround as you suggest.
Quote:

Add the line
*.multiClickTime: 500
to the file ~/.Xdefaults and run
xrdb -merge ~/.Xdefaults
Did you run "xrdb -merge ~/.Xdefaults" or leave it as is? Thank you for this solution.

astrogeek 01-02-2009 01:14 PM

Quote:

Originally Posted by larryhaja (Post 3394845)
Did you run "xrdb -merge ~/.Xdefaults" or leave it as is?

No I did not run xdrb, I simply added the line to my ~/.Xdefaults and it is picked up automatically when X starts.

I am not actually sure, but I think the reason they add the xrdb line is to get the merge behaviour instead of replacing an existing value. Other than that, I could not see a good reason for using xrdb at that point unless your startx chain did not include ~/.Xdefaults - but admittedly, my X knowledge is mostly shallow.


All times are GMT -5. The time now is 04:36 PM.