Tk Source Code

View Ticket
Login
Ticket UUID: 2883597
Title: Patch for bug #943110
Type: Patch Version: None
Submitter: mickey_knox Created on: 2009-10-21 23:24:11
Subsystem: 68. Win Window Operations Assigned To: chengyemao
Priority: 7 High Severity:
Status: Closed Last Modified: 2010-01-18 09:20:21
Resolution: Rejected Closed By: sf-robot
    Closed on: 2010-01-18 02:20:21
Description:
The patch contains fixes preventing WM_MOUSEMOVE triggering ButtonDown/ButtonUp events.
User Comments: sf-robot added on 2010-01-18 09:20:21:

allow_comments - 1

sf-robot added on 2010-01-18 09:20:20:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

mickey_knox added on 2010-01-03 21:37:27:
This bug does not reveal itself when using tk_getOpenFile (since there's a hack there), but try something similar - open Notepad and use its "Open file" dialog positioning it over a Tk application with a button - the button WILL be clicked when you select a file with double-click. There are some non-Tk applications that have a similar bug, but from what I tested, the majority does not. I even wrote some "applications" in Delphi, MASM, VBA (a toplevel window with a single large button), and all of them did not catch the "orphaned" click.
Since the patch is flawed, just reject it until someone comes with a better and more compatible solution.

patthoyts added on 2010-01-03 18:55:36:
The issue refered to is that double-clicking a file item in a tk_getOpenFile dialog when it is over a Tk button can result in the button -command script being run.
A test is to create a large button eg:
pack [button .b -text Waiting -width 100 -height 30 -command {.b configure -text CLICKED}]
and call tk_getOpenFile, position it over the button and double click a file icon.
Originally this would click the button. Since we added the EatSpuriousMessageBug hack it no longer gets clicked.
So this patch appears to be no longer necessary. If you disagree please provide a test case or some reason why we need to apply this. It looks like  a clean patch that just tries to improve the mouse event handling under some circumstances. However you cannot change functions in the stub table interfaces. The stubs interfaces are a contract between Tk and extensions that makes it possible to upgrade Tk and have extensions that were built against older versions still work with the newer dll. To do what you have here it is necessary to create a new function and have the old Tk_PointerEvent call the new Tk_PointerEventEx (or whatever its called).

We need very good reasons before changing stubs tables entries as we have to live with them for ever. Stubs changes usually require a TIP to be raised following the procedures at http://tip.tcl.tk/1 and require a vote from the core team.

mickey_knox added on 2009-10-24 17:23:54:
Missed one spot in original patch, so here's a corrected one...

mickey_knox added on 2009-10-24 17:22:25:

File Deleted - 347667: 



File Added - 347985: undesired_click_fix_2.patch

mickey_knox added on 2009-10-22 06:24:13:

File Added - 347667: undesired_click_fix.patch

Attachments: