diff options
author | joye <joye> | 2014-06-02 20:57:47 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-02 20:57:47 (GMT) |
commit | 7c8ac21e83f54d2073aa06d0a588d89690468850 (patch) | |
tree | b9d13bb0788049d706bdbf56f53778f49e23931c /src | |
parent | cdddc8a605504152b60bd34781d9018e2d752650 (diff) | |
download | blt-7c8ac21e83f54d2073aa06d0a588d89690468850.zip blt-7c8ac21e83f54d2073aa06d0a588d89690468850.tar.gz blt-7c8ac21e83f54d2073aa06d0a588d89690468850.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrBind.C | 18 | ||||
-rw-r--r-- | src/bltGrBind.h | 2 |
2 files changed, 5 insertions, 15 deletions
diff --git a/src/bltGrBind.C b/src/bltGrBind.C index a649667..50e50bf 100644 --- a/src/bltGrBind.C +++ b/src/bltGrBind.C @@ -144,9 +144,6 @@ void BindTable::deleteBindings(ClientData object) void BindTable::doEvent(XEvent* eventPtr) { - if (!graphPtr_->tkwin_ || !table_) - return; - ClientData item = currentItem_; ClassId classId = currentContext_; @@ -160,6 +157,7 @@ void BindTable::doEvent(XEvent* eventPtr) int nTags; const char** tagArray = graphPtr_->getTags(item, classId, &nTags); Tk_BindEvent(table_, eventPtr, graphPtr_->tkwin_, nTags, (void**)tagArray); + if (tagArray) delete [] tagArray; } @@ -206,31 +204,23 @@ static void BindProc(ClientData clientData, XEvent* eventPtr) case ButtonPress: case ButtonRelease: bindPtr->state_ = eventPtr->xbutton.state; - bindPtr->pickItem(eventPtr); - bindPtr->doEvent(eventPtr); break; - case EnterNotify: case LeaveNotify: bindPtr->state_ = eventPtr->xcrossing.state; - bindPtr->pickItem(eventPtr); - bindPtr->doEvent(eventPtr); break; - case MotionNotify: bindPtr->state_ = eventPtr->xmotion.state; - bindPtr->pickItem(eventPtr); - bindPtr->doEvent(eventPtr); break; - case KeyPress: case KeyRelease: bindPtr->state_ = eventPtr->xkey.state; - bindPtr->pickItem(eventPtr); - bindPtr->doEvent(eventPtr); break; } + bindPtr->pickItem(eventPtr); + bindPtr->doEvent(eventPtr); + Tcl_Release(bindPtr->graphPtr_); } diff --git a/src/bltGrBind.h b/src/bltGrBind.h index cf98c0f..78d5014 100644 --- a/src/bltGrBind.h +++ b/src/bltGrBind.h @@ -41,7 +41,7 @@ class Graph; class BindTable { protected: Tk_BindingTable table_; - unsigned int flags_; + unsigned int grab_; ClientData newItem_; ClassId newContext_; Pick* pickPtr_; |