mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
action toolbar popup - actions buttons didnt work in modal states
This commit is contained in:
@@ -1104,7 +1104,7 @@ public class AbstractPopup implements JBPopup {
|
||||
|
||||
public void eventDispatched(final AWTEvent event) {
|
||||
if (event.getID() == WindowEvent.WINDOW_ACTIVATED) {
|
||||
if (myCancelOnWindow) {
|
||||
if (myCancelOnWindow && myPopup != null && !myPopup.isPopupWindow(((WindowEvent)event).getWindow())) {
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ public interface PopupComponent {
|
||||
|
||||
void setRequestFocus(boolean requestFocus);
|
||||
|
||||
boolean isPopupWindow(Window window);
|
||||
|
||||
interface Factory {
|
||||
PopupComponent getPopup(Component owner, Component content, int x, int y);
|
||||
|
||||
@@ -88,6 +90,11 @@ public interface PopupComponent {
|
||||
myRequestFocus = requestFocus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPopupWindow(Window window) {
|
||||
return myDialog != null && myDialog == window;
|
||||
}
|
||||
|
||||
public DialogPopupWrapper(Component owner, Component content, int x, int y) {
|
||||
if (!owner.isShowing()) {
|
||||
throw new IllegalArgumentException("Popup owner must be showing");
|
||||
@@ -145,6 +152,12 @@ public interface PopupComponent {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPopupWindow(Window window) {
|
||||
final Window wnd = getWindow();
|
||||
return wnd != null && wnd == window;
|
||||
}
|
||||
|
||||
public void hide(boolean dispose) {
|
||||
myPopup.hide();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user