For some unknown reason, this combination of mc.toggleFullscreen() and the Swing File Chooser doesn't freeze the JVM on Windows when in Fullscreen

This commit is contained in:
CrushedPixel
2015-08-16 12:10:56 +02:00
parent c7072dbef2
commit 46f13a200c

View File

@@ -67,8 +67,6 @@ public class GuiFileChooser extends GuiAdvancedButton implements GuiOutsideClick
e.printStackTrace(); e.printStackTrace();
} }
if(mc.isFullScreen()) mc.toggleFullscreen();
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override @Override
public void run() { public void run() {
@@ -92,6 +90,14 @@ public class GuiFileChooser extends GuiAdvancedButton implements GuiOutsideClick
fileChooser.setVisible(true); fileChooser.setVisible(true);
mc.addScheduledTask(new Runnable() {
@Override
public void run() {
if(mc.isFullScreen()) mc.toggleFullscreen();
mc.setIngameNotInFocus();
}
});
int result; int result;
if(save) { if(save) {