diff options
Diffstat (limited to 'src/demos/es2/RedSquare.java')
-rwxr-xr-x | src/demos/es2/RedSquare.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java index 58c55c8..b0f86d1 100755 --- a/src/demos/es2/RedSquare.java +++ b/src/demos/es2/RedSquare.java @@ -43,7 +43,9 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo public void keyPressed(KeyEvent e) { System.out.println(glp+" "+e); - if(e.getKeyChar()=='q') { + if(e.getKeyChar()=='f') { + window.setFullscreen(!window.isFullscreen()); + } else if(e.getKeyChar()=='q') { quit = true; } } @@ -58,7 +60,9 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo System.out.println(glp+" mouseevent: "+e); switch(e.getClickCount()) { case 1: - window.setFullscreen(!window.isFullscreen()); + if(e.getButton()>MouseEvent.BUTTON1) { + window.setFullscreen(!window.isFullscreen()); + } break; default: quit=true; |