diff options
author | joye <joye> | 2014-06-02 19:58:46 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-02 19:58:46 (GMT) |
commit | 03cb7456569ba0fdaeab16446eeb62f4d124b042 (patch) | |
tree | 60aed115cb078f4baa77107262112a70663c263a /src/bltGrBind.C | |
parent | c7f69dceaed915906668278c317c592721b938f9 (diff) | |
download | blt-03cb7456569ba0fdaeab16446eeb62f4d124b042.zip blt-03cb7456569ba0fdaeab16446eeb62f4d124b042.tar.gz blt-03cb7456569ba0fdaeab16446eeb62f4d124b042.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrBind.C')
-rw-r--r-- | src/bltGrBind.C | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/bltGrBind.C b/src/bltGrBind.C index 58088ab..5476870 100644 --- a/src/bltGrBind.C +++ b/src/bltGrBind.C @@ -176,8 +176,8 @@ void BindTable::pickItem(XEvent* eventPtr) // This implements a form of grabbing equivalent to what the X server does // for windows. - int buttonDown = state_ & - (Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask); + int buttonDown = state_ + & (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask); // Save information about this event in the widget. The event in the // widget is used for two purposes: @@ -226,6 +226,10 @@ void BindTable::pickItem(XEvent* eventPtr) int y = pickEvent_.xcrossing.y; newItem_ = pickPtr_->pickEntry(x, y, &newContext_); } + else { + newItem_ =NULL; + newContext_ = CID_NONE; + } // Nothing to do: the current item hasn't changed. if ((newItem_ == currentItem_) && !(flags_ & LEFT_GRABBED_ITEM)) @@ -234,11 +238,15 @@ void BindTable::pickItem(XEvent* eventPtr) if (!buttonDown) flags_ &= ~LEFT_GRABBED_ITEM; + if ((newItem_ != currentItem_) && buttonDown) { + flags_ |= LEFT_GRABBED_ITEM; + return; + } + // Simulate a LeaveNotify event on the previous current item and an // EnterNotify event on the new current item. Remove the "current" tag // from the previous current item and place it on the new current item. - if ((newItem_ != currentItem_) && currentItem_ && - !(flags_ & LEFT_GRABBED_ITEM)) { + if (currentItem_ && (newItem_ != currentItem_) && !(flags_ & LEFT_GRABBED_ITEM)) { XEvent event = pickEvent_; event.type = LeaveNotify; |