mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix close button [r=peter] (cherry picked from commit 0b7ed57)
This commit is contained in:
@@ -188,9 +188,9 @@ public abstract class ToolWindowHeader extends JPanel implements Disposable {
|
||||
});
|
||||
|
||||
addMouseListener(new MouseAdapter() {
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
public void mouseReleased(final MouseEvent e) {
|
||||
if (!e.isPopupTrigger()) {
|
||||
if (UIUtil.isCloseClick(e)) {
|
||||
if (UIUtil.isCloseClick(e, MouseEvent.MOUSE_RELEASED)) {
|
||||
if (e.isAltDown()) {
|
||||
toolWindow.fireHidden();
|
||||
}
|
||||
|
||||
+10
-4
@@ -307,14 +307,20 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
myLastPoint[0] = e.getPoint();
|
||||
SwingUtilities.convertPointToScreen(myLastPoint[0], c);
|
||||
if (!e.isPopupTrigger()) {
|
||||
if (UIUtil.isCloseClick(e)) {
|
||||
ui.processHide(e);
|
||||
}
|
||||
else {
|
||||
if (!UIUtil.isCloseClick(e)) {
|
||||
ui.myWindow.fireActivated();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
if (!e.isPopupTrigger()) {
|
||||
if (UIUtil.isCloseClick(e, MouseEvent.MOUSE_RELEASED)) {
|
||||
ui.processHide(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user