mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-116760 Mousing over "tool popup" button causes funny behavior
This commit is contained in:
+7
-2
@@ -72,8 +72,13 @@ class ToolWindowsWidget extends JLabel implements CustomStatusBarWidget, StatusB
|
||||
@Override
|
||||
public boolean dispatch(AWTEvent e) {
|
||||
if (e instanceof MouseEvent) {
|
||||
MouseEvent mouseEvent = (MouseEvent)e;
|
||||
if (mouseEvent.getComponent() == null || !SwingUtilities.isDescendingFrom(mouseEvent.getComponent(), SwingUtilities.getWindowAncestor(ToolWindowsWidget.this))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.getID() == MouseEvent.MOUSE_MOVED && isShowing()) {
|
||||
Point p = ((MouseEvent)e).getLocationOnScreen();
|
||||
Point p = mouseEvent.getLocationOnScreen();
|
||||
Point screen = ToolWindowsWidget.this.getLocationOnScreen();
|
||||
if (new Rectangle(screen.x - 4, screen.y - 2, getWidth() + 4, getHeight() + 4).contains(p)) {
|
||||
mouseEntered();
|
||||
@@ -85,7 +90,7 @@ class ToolWindowsWidget extends JLabel implements CustomStatusBarWidget, StatusB
|
||||
}
|
||||
} else if (e.getID() == MouseEvent.MOUSE_EXITED) {
|
||||
//mouse exits WND
|
||||
mouseExited(((MouseEvent)e).getLocationOnScreen());
|
||||
mouseExited(mouseEvent.getLocationOnScreen());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user