#972 double-click doesn't trigger any event on Korean WIN98/NT

obsolete: 8.3.2
open
Jeffrey Hobbs
69. Events (88)
5
2011-06-01
2001-01-08
June Kim
No

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.

Discussion

  • Jeffrey Hobbs
    Jeffrey Hobbs
    2001-01-09

    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.

     
  • Don Porter
    Don Porter
    2003-11-12

    • assigned_to: nobody --> hobbs
     
  • Logged In: NO

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

     
  • 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.

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2008-11-05

    • status: open --> closed-out-of-date
     
  • Jasper
    Jasper
    2011-05-31

    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?

     
  • 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).

     
  • Jasper
    Jasper
    2011-06-01

    This one should be open, dammit! A wealthy industrial nation of 50 million people can't doubleclick!

     
  • Reopened, but I don't know who to assign this to.

     
    • status: closed-out-of-date --> open
     
  • Jasper
    Jasper
    2011-06-03

    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.