Tk Source Code

View Ticket
Login
Ticket UUID: 220790
Title: ButtonRelease not reported properly to globally grabbing win
Type: Bug Version: obsolete: 8.0.4
Submitter: welch Created on: 2000-11-01 00:54:10
Subsystem: 68. Win Window Operations Assigned To: chengyemao
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2008-03-13 16:19:33
Resolution: Fixed Closed By: pcaffin
    Closed on: 2008-03-13 09:19:33
Description:
OriginalBugID: 1378 Bug
Version: 8.0.4
SubmitDate: '1999-03-02'
LastModified: '2000-01-31'
Severity: MED
Status: Assigned
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 1268
OS: Windows NT
OSVersion: 4.0
Machine: X86


Name:
Jon Hilbert

ReproducibleScript:
run wish. In console type
bind . <B1-Motion> {grab -global .}
bind . <ButtonRelease-1> {grab release .; puts "release"}

move mouse over ., press button 1 and drag over desktop, then release - no release event is printed. Then press button 1 (still over desktop) - NOW you get a release event reported.

This behaviour is different if you type
grab -global .

in the console BEFORE moving over . and starting the drag. In that case, the release event is recorded at the appropriate time.

Also...
It would appear that 8.0.4 cannot be built with MSVC 4.2 or earlier any more because of the inclusion of <zmouse.h> in tkWinX.c. Perhaps a conditional compile around the use of WM_MOUSEWHEEL would be useful?



Verified on NT with 8.3b2.  We no longer support MSVC4.2 though
(for the second item). 
-- 01/31/2000 hobbs
User Comments: pcaffin added on 2008-03-13 16:18:44:
Logged In: YES 
user_id=2029956
Originator: NO

I've tested this with Tk 8.5.2.0.284581 (teapot) on Debian Linux, Windows XP Pro SP2 and Mac OS X 10.4, using the following:

1. Using wish, in the console, pasted those two commands (with the endoding changed back).
2. Clicked with Mouse button 1 in the wish window area with the binding, released on the desktop. The behavior was correct.
3. Clicked with Mouse button 1 in the wish window area with the binding, released on the window area with the binding. The behavior was correct there too.

I was unable to replicate this error on any of these platforms. It seems to have been fixed at some stage. Closing.

ctasada added on 2006-09-27 16:05:53:
Logged In: YES 
user_id=340696

I think that the script to reproduce the problem is:

% bind . <B1-Motion> {grab .}
% bind . <ButtonRelease-1> {grab release .; puts "release"}

and it works correctly with

% bind . <B1-Motion> {grab -global .}
% bind . <ButtonRelease-1> {grab release .; puts "release"}

isn't it? 

Is this bug related with #531658?

Anyway seems strange that this bug is still open after 5 years.