mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
toolwindow dragging problems fix (cherry picked from commit 6b3ffea)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -188,9 +188,9 @@ public abstract class ToolWindowHeader extends JPanel implements Disposable {
|
||||
});
|
||||
|
||||
addMouseListener(new MouseAdapter() {
|
||||
public void mouseReleased(final MouseEvent e) {
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
if (!e.isPopupTrigger()) {
|
||||
if (UIUtil.isCloseClick(e, MouseEvent.MOUSE_RELEASED)) {
|
||||
if (UIUtil.isCloseClick(e)) {
|
||||
if (e.isAltDown()) {
|
||||
toolWindow.fireHidden();
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -303,11 +303,11 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
});
|
||||
|
||||
c.addMouseListener(new MouseAdapter() {
|
||||
public void mouseReleased(final MouseEvent e) {
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
myLastPoint[0] = e.getPoint();
|
||||
SwingUtilities.convertPointToScreen(myLastPoint[0], c);
|
||||
if (!e.isPopupTrigger()) {
|
||||
if (UIUtil.isCloseClick(e, MouseEvent.MOUSE_RELEASED)) {
|
||||
if (UIUtil.isCloseClick(e)) {
|
||||
ui.processHide(e);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user