diff options
author | marc_culler <marc.culler@gmail.com> | 2023-11-27 15:31:55 (GMT) |
---|---|---|
committer | marc_culler <marc.culler@gmail.com> | 2023-11-27 15:31:55 (GMT) |
commit | c60d0f8978d1ebd2ec490caa1464b450c70b9d9f (patch) | |
tree | 0621b90d234f438e570f1d01a1b33bff5ff1ed4a /generic/tkBind.c | |
parent | 86bb88b4cfed28625b8dfadb202c7f86d2531ec3 (diff) | |
download | tk-c60d0f8978d1ebd2ec490caa1464b450c70b9d9f.zip tk-c60d0f8978d1ebd2ec490caa1464b450c70b9d9f.tar.gz tk-c60d0f8978d1ebd2ec490caa1464b450c70b9d9f.tar.bz2 |
Introduce a separate TouchpadScroll event. Avoids Extended-MouseWheel events being handled by MouseWheel bindings.
Diffstat (limited to 'generic/tkBind.c')
-rw-r--r-- | generic/tkBind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index acd982b..6c83dd0 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -528,6 +528,7 @@ static const EventInfo eventArray[] = { {"Activate", ActivateNotify, ActivateMask}, {"Deactivate", DeactivateNotify, ActivateMask}, {"MouseWheel", MouseWheelEvent, MouseWheelMask}, + {"TouchpadScroll", TouchpadScroll, TouchpadScrollMask}, {"CirculateRequest", CirculateRequest, SubstructureRedirectMask}, {"ConfigureRequest", ConfigureRequest, SubstructureRedirectMask}, {"Create", CreateNotify, SubstructureNotifyMask}, @@ -632,7 +633,8 @@ static const int flagArray[TK_LASTEVENT] = { /* VirtualEvent */ VIRTUAL, /* Activate */ ACTIVATE, /* Deactivate */ ACTIVATE, - /* MouseWheel */ WHEEL + /* MouseWheel */ WHEEL, + /* TouchpadScroll */ WHEEL }; /* @@ -5016,7 +5018,6 @@ 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; @@ -5091,7 +5092,6 @@ ParseEventDescription( } else if (patPtr->eventType == MotionNotify) { patPtr->info = ButtonNumberFromState(patPtr->modMask); } - p = SkipFieldDelims(p); if (*p != '>') { |