diff --git a/generic/tkBind.c b/generic/tkBind.c index c93e86902..b3d19eedb 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -49,16 +49,6 @@ * Non-package-specific helpers. */ -/* - * Traditionally motion events can be combined with buttons in this way: . - * However it should be allowed to express this as in addition. This is achieved - * by setting SUPPORT_ADDITIONAL_MOTION_SYNTAX to 1. - */ - -#ifndef SUPPORT_ADDITIONAL_MOTION_SYNTAX -# define SUPPORT_ADDITIONAL_MOTION_SYNTAX 1 -#endif - /* * The output for motion events is of the type . This can be changed to become * instead by setting PRINT_SHORT_MOTION_SYNTAX to 1, however this would be a @@ -69,11 +59,6 @@ # define PRINT_SHORT_MOTION_SYNTAX 0 /* set to 1 if wanted */ #endif -#if !SUPPORT_ADDITIONAL_MOTION_SYNTAX -# undef PRINT_SHORT_MOTION_SYNTAX -# define PRINT_SHORT_MOTION_SYNTAX 0 -#endif - /* * For debugging only, normally set to zero. */ @@ -3015,7 +3000,7 @@ ExpandPercents( for (string = before; *string && *string != '%'; ++string) ; if (string != before) { - Tcl_DStringAppend(dsPtr, before, (Tcl_Size)(string - before)); + Tcl_DStringAppend(dsPtr, before, string - before); before = string; } if (!*before) { @@ -4991,6 +4976,7 @@ ParseEventDescription( eventFlags = 0; if ((hPtr = Tcl_FindHashEntry(&eventTable, field))) { const EventInfo *eiPtr = (const EventInfo *)Tcl_GetHashValue(hPtr); + patPtr->eventType = eiPtr->type; eventFlags = flagArray[eiPtr->type]; eventMask = eiPtr->eventMask; @@ -5001,7 +4987,7 @@ ParseEventDescription( if ((eventFlags & BUTTON) || (button && eventFlags == 0) - || (SUPPORT_ADDITIONAL_MOTION_SYNTAX && (eventFlags & MOTION) && button == 0)) { + || ((eventFlags & MOTION) && button == 0)) { /* This must be a button (or bad motion) event. */ if (button == 0) { return FinalizeParseEventDescription( @@ -5028,14 +5014,13 @@ ParseEventDescription( eventMask = KeyPressMask; } } else if (button) { - if (!SUPPORT_ADDITIONAL_MOTION_SYNTAX || patPtr->eventType != MotionNotify) { + if (patPtr->eventType != MotionNotify) { return FinalizeParseEventDescription( interp, patPtr, 0, Tcl_ObjPrintf("specified button \"%s\" for non-button event", field), "NON_BUTTON"); } -#if SUPPORT_ADDITIONAL_MOTION_SYNTAX patPtr->modMask |= Tk_GetButtonMask(button); p = SkipFieldDelims(p); while (*p && *p != '>') { @@ -5049,7 +5034,6 @@ ParseEventDescription( patPtr->modMask |= Tk_GetButtonMask(button); } patPtr->info = ButtonNumberFromState(patPtr->modMask); -#endif } else { return FinalizeParseEventDescription( interp, diff --git a/tests/wm.test b/tests/wm.test index ea366a5d4..85aaa9044 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -1511,10 +1511,10 @@ test wm-stackorder-2.3 {stacking order} -body { toplevel .t2 tkwait visibility .t2 raiseDelay - lappend res [wm stackorder .] + lappend res [wm stackorder .] raise . raiseDelay - lappend res [wm stackorder .] + lappend res [wm stackorder .] raise .t2 raiseDelay lappend res [wm stackorder .]