From aa6e71dc160e078f608188a5e30756dfd6e9aa67 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 17 Apr 2008 14:52:22 +0000 Subject: * generic/tkCanvas.c: Fix logic that determines when canvas item event should fire. Thanks to Sebastian Wangnick. [Bug 1327482] --- ChangeLog | 11 ++++++++--- generic/tkCanvas.c | 9 +++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f67cad..d78fdf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ +2008-04-17 Don Porter + + * generic/tkCanvas.c: Fix logic that determines when canvas item + event should fire. Thanks to Sebastian Wangnick. [Bug 1327482] + 2008-04-14 Pat Thoyts - * win/tkWinDialog.c: backport tk_chooseColor -title fix from head - * win/tkWinTest.c: Added parent to testgetwininfo - * tests/winDialog.test: Created some tk_chooseColor win tests. + * win/tkWinDialog.c: backport tk_chooseColor -title fix from head + * win/tkWinTest.c: Added parent to testgetwininfo + * tests/winDialog.test: Created some tk_chooseColor win tests. 2008-04-11 Don Porter diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 85c37c9..5872d55 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvas.c,v 1.46 2007/12/13 15:24:13 dgp Exp $ + * RCS: @(#) $Id: tkCanvas.c,v 1.46.2.1 2008/04/17 14:52:24 dgp Exp $ */ /* #define USE_OLD_TAG_SEARCH 1 */ @@ -4483,9 +4483,6 @@ PickCurrentItem( buttonDown = canvasPtr->state & (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask); - if (!buttonDown) { - canvasPtr->flags &= ~LEFT_GRABBED_ITEM; - } /* * Save information about this event in the canvas. The event in the @@ -4560,6 +4557,10 @@ PickCurrentItem( return; } + if (!buttonDown) { + canvasPtr->flags &= ~LEFT_GRABBED_ITEM; + } + /* * Simulate a LeaveNotify event on the previous current item and an * EnterNotify event on the new current item. Remove the "current" tag -- cgit v0.12