mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
restore "CancelOnWindow" logic broken in 2012
Canceller stopped being initialized on myCancelOnWindow. This also fixes Switcher vs numbered Bookmark problem where Switcher does not go away when editor is activated.
This commit is contained in:
@@ -33,7 +33,10 @@ import com.intellij.ui.border.CustomLineBorder;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.ui.mac.touchbar.TouchBarsManager;
|
||||
import com.intellij.ui.speedSearch.SpeedSearch;
|
||||
import com.intellij.util.*;
|
||||
import com.intellij.util.BooleanFunction;
|
||||
import com.intellij.util.FunctionUtil;
|
||||
import com.intellij.util.IJSwingUtilities;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.WeakList;
|
||||
import com.intellij.util.ui.*;
|
||||
@@ -773,7 +776,6 @@ public class AbstractPopup implements JBPopup {
|
||||
debugState("show popup", State.INIT);
|
||||
myState = State.SHOWING;
|
||||
|
||||
installWindowHook(this);
|
||||
installProjectDisposer();
|
||||
addActivity();
|
||||
|
||||
@@ -1118,14 +1120,6 @@ public class AbstractPopup implements JBPopup {
|
||||
}
|
||||
}
|
||||
|
||||
//Sometimes just after popup was shown the WINDOW_ACTIVATED cancels it
|
||||
private static void installWindowHook(final AbstractPopup popup) {
|
||||
if (popup.myCancelOnWindow) {
|
||||
popup.myCancelOnWindow = false;
|
||||
new Alarm(popup).addRequest(() -> popup.myCancelOnWindow = true, 100);
|
||||
}
|
||||
}
|
||||
|
||||
private void addActivity() {
|
||||
UiActivityMonitor.getInstance().addActivity(myActivityKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user