choose by name popups are not modal context

This commit is contained in:
Dmitry Jemerov
2010-08-27 19:43:16 +04:00
parent 34b83c8009
commit 296b2c1f47
2 changed files with 2 additions and 5 deletions
@@ -62,7 +62,6 @@ import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
@@ -597,7 +596,7 @@ public abstract class ChooseByNameBase {
close(false);
return Boolean.TRUE;
}
}).setFocusable(true).setRequestFocus(true).setForceHeavyweight(true);
}).setFocusable(true).setRequestFocus(true).setForceHeavyweight(true).setModalContext(false);
Point point = new Point(x, y);
SwingUtilities.convertPointToScreen(point, layeredPane);
@@ -24,9 +24,7 @@ import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.wm.ex.LayoutFocusTraversalPolicyExt;
import com.intellij.psi.PsiElement;
import com.intellij.psi.statistics.StatisticsInfo;
import com.intellij.psi.statistics.StatisticsManager;
@@ -101,7 +99,7 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP
myListScrollPane.setBorder(null);
if (myDropdownPopup == null) {
ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(myListScrollPane, myListScrollPane);
builder.setFocusable(false).setRequestFocus(false).setCancelKeyEnabled(false).setFocusOwners(new JComponent[] {myTextField}).setBelongsToGlobalPopupStack(false).setForceHeavyweight(true);
builder.setFocusable(false).setRequestFocus(false).setCancelKeyEnabled(false).setFocusOwners(new JComponent[] {myTextField}).setBelongsToGlobalPopupStack(false).setForceHeavyweight(true).setModalContext(false);
builder.setCancelCallback(new Computable<Boolean>() {
@Override
public Boolean compute() {