Tk Source Code

View Ticket
Login
Ticket UUID: 227980
Title: double-click doesn't trigger any event on Korean WIN98/NT
Type: Bug Version: obsolete: 8.3.2
Submitter: juneaftn Created on: 2001-01-08 00:56:22
Subsystem: 69. Events Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Open Last Modified: 2026-09-23 12:43:33
Resolution: None Closed By: hobbs
    Closed on: 2008-11-05 00:21:04
Description:
ReproducibleScript:
SCRIPT:
bind . <Double-1> {puts  2}
 
command line : wish82.exe <scriptname> > <outfile> 
 
ObservedBehavior:
On the Korean (Windows 95/98/NT) systems, double-click does not seem to trigger any event (output file is empty). This behaviour was not detected on other language systems.
User Comments: serhiy.storchaka added on 2026-09-23 12:43:33:

Cannot reproduce on Windows 11 x64, neither with Tk 9.1b1 nor with 8.6.18: <Double-1> fires for a binding on a widget, on a canvas item and on the canvas widget, 170-190 ms after the first click.

In the logs only the <Double-1> script runs on the second click, as the more specific pattern for that tag, and further clicks within 500 ms keep matching it. Both versions behave the same: four clicks 150 ms apart give P D D D, four clicks 800 ms apart give P P P P.

Not tested here: a 32-bit build, which the 2011 report names as the difference, and a Korean system locale.


jaspertheperson added on 2011-06-03 16:45:08:
Here is a workaround. If you want to catch a doubleclick, bind it as normal, but call this procedure to bind your single click action (or empty list if no action for single click)
##############################
set ::clickTimeKO 0
proc KoreanClick {widget buttonNo cmd} {
    if {[string match windows $::tcl_platform(platform)]} {
bind $widget <Button-$buttonNo> [subst -nocommands {
    set gap [expr {[clock milliseconds]-[set ::clickTimeKO]}]
    incr ::clickTimeKO [set gap]
    if {[set gap]<500} {
event generate [list $widget] <Button-$buttonNo> \
    -rootx %X -rooty %Y -x %x -y %y
# which will be converted to double
    } else {
eval [list $cmd]
    }
}]
    } else { # no bug to work around
bind $widget <Button-$buttonNo> $cmd
    }
}
###########################################
Now, normally a click just calls the bound procedure. But if it follows the last one by less than 500ms (of course you could get the user-specified doubleclick interfval from the registry) then instead another click is generated. This calls the same procedure again, which generates a third click event -- but that one actually comes back as a doubleclick, and is handled by your doubleclick procedure.

dkf added on 2011-06-01 19:14:11:
Reopened, but I don't know who to assign this to.

jaspertheperson added on 2011-06-01 16:00:29:
This one should be open, dammit! A wealthy industrial nation of 50 million people can't doubleclick!

dkf added on 2011-05-31 17:37:20:
Tcl Bug #219196 is older, open, and becoming rather pressing despite being very awkward to fix without breaking huge amounts of code (it's basically that Tcl's not fully 64-bit ready at its API level; many C datatypes and interfaces are just specified wrong).

jaspertheperson added on 2011-05-31 17:02:23:
I created item 3259766 and closed it as it was a duplicate of this one. Main points from there:
* You do not need a non-English version of Windows to reproduce the problem
* Doubleclicks bound to widgets are lost, but doubleclicks bound to canvas items are OK
...and since closing it I have found...
* Problem affects TclTk 8.5.9 32-bit on Windows 7 but not 64-bit

Is this TclTk's longest-standing bug?

[email protected] added on 2008-06-27 06:04:19:
Logged In: NO 

Watching the frame with a windows spy sw(winspector), I notice that WM_LBUTTONDBLCLK isn't send at all when I double click it.

[email protected] added on 2008-06-27 05:27:27:
Logged In: NO 

It's been more than 7 years since the first submittion but the problem still remains with Windows XP SP2.

hobbs added on 2001-01-09 07:18:12:
I wanted to confirm this from reports earlier by ICEMCFD and personal confirmation (after they sent me a Korean install of Windows).  However, this works fine on Chinese and Japanese Windows (I'm not sure how specific the correlation in underlying code is for these).  I've looked in the MSDN for an answer, but came up empty.