mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
another attempt to fix mac dialogs showing
This commit is contained in:
@@ -36,18 +36,12 @@ import com.intellij.openapi.ui.Queryable;
|
||||
import com.intellij.openapi.ui.popup.StackingPopupDispatcher;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.wm.FocusCommand;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.openapi.wm.KeyEventProcessor;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import com.intellij.openapi.wm.*;
|
||||
import com.intellij.openapi.wm.ex.LayoutFocusTraversalPolicyExt;
|
||||
import com.intellij.openapi.wm.ex.WindowManagerEx;
|
||||
import com.intellij.openapi.wm.impl.IdeFrameImpl;
|
||||
import com.intellij.openapi.wm.impl.IdeGlassPaneImpl;
|
||||
import com.intellij.ui.AppUIUtil;
|
||||
import com.intellij.ui.FocusTrackback;
|
||||
import com.intellij.ui.ScreenUtil;
|
||||
import com.intellij.ui.SpeedSearchBase;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.mac.foundation.Foundation;
|
||||
import com.intellij.ui.mac.foundation.ID;
|
||||
import com.intellij.ui.mac.foundation.MacUtil;
|
||||
@@ -720,21 +714,9 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer implements FocusTra
|
||||
|
||||
addWindowListener(macFullScreenPatchListener);
|
||||
}
|
||||
if (SystemInfo.isMac && Registry.is("ide.mac.fix.dialog.showing")) {
|
||||
final Window owner = getOwner();
|
||||
if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow() != owner) {
|
||||
final Ref<WindowAdapter> dialogFixerRef = new Ref<WindowAdapter>();
|
||||
final WindowAdapter dialogFixer = new WindowAdapter() {
|
||||
@Override
|
||||
public void windowActivated(WindowEvent e) {
|
||||
owner.removeWindowListener(dialogFixerRef.get());
|
||||
superShow();
|
||||
}
|
||||
};
|
||||
dialogFixerRef.set(dialogFixer);
|
||||
owner.addWindowListener(dialogFixer);
|
||||
return;
|
||||
}
|
||||
if (SystemInfo.isMac && myProject != null && Registry.is("ide.mac.fix.dialog.showing") && !dialogWrapper.isModalProgress()) {
|
||||
final IdeFrame frame = WindowManager.getInstance().getIdeFrame(myProject.get());
|
||||
AppIcon.getInstance().requestFocus(frame);
|
||||
}
|
||||
|
||||
superShow();
|
||||
|
||||
Reference in New Issue
Block a user