Skip to content

Commit

Permalink
Merge pull request #95 from sesteel/master
Browse files Browse the repository at this point in the history
removed MouseHover event registration to avoid race condition...
  • Loading branch information
sesteel committed Feb 26, 2014
2 parents aaea55d + 8a5be58 commit efba507
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project details
group=com.readytalk
version=2.1.0
version=2.1.1


# Optimize the build environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.readytalk.swt.text.tokenizer.TextTokenizerType;
import com.readytalk.swt.util.ColorFactory;
import com.readytalk.swt.widgets.CustomElementDataProvider;
import com.readytalk.swt.widgets.notifications.BubbleRegistry.BubbleRegistrant;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleAdapter;
import org.eclipse.swt.accessibility.AccessibleEvent;
Expand Down Expand Up @@ -264,13 +265,19 @@ public void handleEvent(Event event) {
case SWT.MouseDown:
onMouseDown(event);
break;
case SWT.MouseEnter:
BubbleRegistrant registrant = BubbleRegistry.getInstance().findRegistrant(getPoppedOverItem().getControlOrCustomElement());
registrant.dismissBubble();
registrant.bubble.setDisableAutoHide(false);
break;
default:
break;
}
}
};
popOverShell.addListener(SWT.Paint, listener);
popOverShell.addListener(SWT.MouseDown, listener);
popOverShell.addListener(SWT.MouseEnter, listener);

addAccessibilityHooks(parentControl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public void handleEvent(Event event) {
};
}

customElementDataProvider.getPaintedElement().addListener(SWT.MouseHover, mouseTrackListener);
customElementDataProvider.getPaintedElement().addListener(SWT.MouseMove, mouseTrackListener);
}

void removeMouseListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ private Point getPopOverLocationControlOffscreen(Rectangle displayBounds,
* @return Visibility state of the PopOverShell
*/
public boolean isVisible() {
if (popOverShell == null){
return false;
}
return popOverShell.isVisible();
}

Expand Down

0 comments on commit efba507

Please sign in to comment.