GH-2026 avoid using awt Dimension class to fix input issues on macOS

This commit is contained in:
Petr Mrázek
2017-10-29 12:24:49 +01:00
parent 7add9de1cf
commit b76bdf9368
4 changed files with 15 additions and 145 deletions

View File

@ -43,7 +43,7 @@ public class LegacyFrame extends Frame implements WindowListener
this.addWindowListener ( this );
}
public void start ( Applet mcApplet, String user, String session, Dimension winSize, boolean maximize )
public void start ( Applet mcApplet, String user, String session, int winSizeW, int winSizeH, boolean maximize )
{
try {
appletWrap = new Launcher( mcApplet, new URL ( "http://www.minecraft.net/game" ) );
@ -56,7 +56,7 @@ public class LegacyFrame extends Frame implements WindowListener
appletWrap.setParameter("fullscreen", "false");
mcApplet.setStub(appletWrap);
this.add ( appletWrap );
appletWrap.setPreferredSize ( winSize );
appletWrap.setPreferredSize ( new Dimension (winSizeW, winSizeH) );
this.pack();
this.setLocationRelativeTo ( null );
this.setResizable ( true );