Skip to content

Commit

Permalink
Revert fullscreen support to fix problem on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mdciotti committed Apr 26, 2016
1 parent 705a383 commit 6233b0c
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions src/tetris/GameWindow.java
@@ -1,16 +1,16 @@
package tetris;

import com.apple.eawt.AppEvent;
import com.apple.eawt.FullScreenListener;
import com.apple.eawt.FullScreenUtilities;
//import com.apple.eawt.AppEvent;
//import com.apple.eawt.FullScreenListener;
//import com.apple.eawt.FullScreenUtilities;

import javax.swing.*;
import java.awt.*;

/**
* Created by max on 2016-04-16.
*/
public class GameWindow extends JFrame implements FullScreenListener {
public class GameWindow extends JFrame /*implements FullScreenListener */{

private Tetris display;

Expand All @@ -31,29 +31,29 @@ public GameWindow(String title, Tetris display) {
setVisible(true);
addKeyListener(display);

FullScreenUtilities.setWindowCanFullScreen(this, true);
FullScreenUtilities.addFullScreenListenerTo(this, this);
// FullScreenUtilities.setWindowCanFullScreen(this, true);
// FullScreenUtilities.addFullScreenListenerTo(this, this);
}

public boolean isFullScreen() {
return fullScreen;
}

@Override
public void windowEnteringFullScreen(AppEvent.FullScreenEvent fse) {
fullScreen = true;
display.componentResized(null);
}

@Override
public void windowEnteredFullScreen(AppEvent.FullScreenEvent fse) {}

@Override
public void windowExitingFullScreen(AppEvent.FullScreenEvent fse) {
fullScreen = false;
display.componentResized(null);
}

@Override
public void windowExitedFullScreen(AppEvent.FullScreenEvent fse) {}
// @Override
// public void windowEnteringFullScreen(AppEvent.FullScreenEvent fse) {
// fullScreen = true;
// display.componentResized(null);
// }
//
// @Override
// public void windowEnteredFullScreen(AppEvent.FullScreenEvent fse) {}
//
// @Override
// public void windowExitingFullScreen(AppEvent.FullScreenEvent fse) {
// fullScreen = false;
// display.componentResized(null);
// }
//
// @Override
// public void windowExitedFullScreen(AppEvent.FullScreenEvent fse) {}
}

0 comments on commit 6233b0c

Please sign in to comment.