attempt to deal with focus issues

This commit is contained in:
Ben Fry
2013-06-03 11:30:25 -04:00
parent 3205f22801
commit cafa58b287
2 changed files with 13 additions and 1 deletions
+4 -1
View File
@@ -2154,7 +2154,10 @@ public class PApplet extends Applet
// Changing to this version for 0187
// http://code.google.com/p/processing/issues/detail?id=279
requestFocusInWindow();
//requestFocusInWindow();
// For 2.0, pass this to the renderer, to lend a hand to OpenGL
g.requestFocus(PApplet.this);
}
});
}
+9
View File
@@ -804,6 +804,15 @@ public class PGraphics extends PImage implements PConstants {
// FRAME
/**
* Handle grabbing the focus from the parent applet. Other renderers can
* override this if handling needs to be different.
*/
public void requestFocus(Component parent) { // ignore
parent.requestFocusInWindow();
}
/**
* Some renderers have requirements re: when they are ready to draw.
*/