Skip to content

Commit a105e50

Browse files
authored
Fix losing focus in full screen mode (#8906)
Fixes #8904 I was able to reproduce and fix the problem in workbench (2025.3) and checked that installing to Idea 2026.1 also fixed the issue.
1 parent e965bb8 commit a105e50

1 file changed

Lines changed: 0 additions & 79 deletions

File tree

src/io/flutter/vmService/DartVmServiceDebugProcess.java

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,6 @@ public DartVmServiceDebugProcess(@NotNull final ExecutionEnvironment executionEn
9898

9999
session.setPauseActionSupported(true);
100100

101-
session.addSessionListener(new XDebugSessionListener() {
102-
@Override
103-
public void sessionPaused() {
104-
// This can be removed if XFramesView starts popping the project window to the top of the z-axis stack.
105-
final Project project = getSession().getProject();
106-
focusProject(project);
107-
stackFrameChanged();
108-
}
109-
110-
@Override
111-
public void stackFrameChanged() {
112-
final XStackFrame stackFrame = getSession().getCurrentStackFrame();
113-
myLatestCurrentIsolateId =
114-
stackFrame instanceof DartVmServiceStackFrame ? ((DartVmServiceStackFrame)stackFrame).getIsolateId() : null;
115-
}
116-
});
117-
118101
this.executionEnvironment = executionEnvironment;
119102
this.mapper = mapper;
120103
myConnector = connector;
@@ -594,68 +577,6 @@ private static boolean isDartPatchUri(@NotNull final String uri) {
594577
return uri.startsWith("dart:_") || uri.startsWith("dart:") && uri.contains("-patch/");
595578
}
596579

597-
private static void focusProject(@NotNull Project project) {
598-
final WindowManager windowManager = WindowManager.getInstance();
599-
if (windowManager == null) {
600-
return;
601-
}
602-
603-
final JFrame projectFrame = windowManager.getFrame(project);
604-
if (projectFrame == null) {
605-
return;
606-
}
607-
608-
final int frameState = projectFrame.getExtendedState();
609-
610-
if (BitUtil.isSet(frameState, java.awt.Frame.ICONIFIED)) {
611-
// restore the frame if it is minimized
612-
projectFrame.setExtendedState(frameState ^ java.awt.Frame.ICONIFIED);
613-
projectFrame.toFront();
614-
}
615-
else {
616-
final JFrame anchor = new JFrame();
617-
anchor.setType(Window.Type.UTILITY);
618-
anchor.setUndecorated(true);
619-
anchor.setSize(0, 0);
620-
anchor.addWindowListener(new WindowListener() {
621-
@Override
622-
public void windowOpened(WindowEvent e) {
623-
}
624-
625-
@Override
626-
public void windowClosing(WindowEvent e) {
627-
}
628-
629-
@Override
630-
public void windowClosed(WindowEvent e) {
631-
}
632-
633-
@Override
634-
public void windowIconified(WindowEvent e) {
635-
}
636-
637-
@Override
638-
public void windowDeiconified(WindowEvent e) {
639-
}
640-
641-
@Override
642-
public void windowActivated(WindowEvent e) {
643-
if (projectFrame.isDisplayable()) {
644-
projectFrame.setVisible(true);
645-
}
646-
anchor.dispose();
647-
}
648-
649-
@Override
650-
public void windowDeactivated(WindowEvent e) {
651-
}
652-
});
653-
anchor.pack();
654-
anchor.setVisible(true);
655-
anchor.toFront();
656-
}
657-
}
658-
659580
public interface PositionMapper {
660581
void onConnect(ScriptProvider provider, String remoteBaseUrl);
661582

0 commit comments

Comments
 (0)