mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
another focus tweak
This commit is contained in:
@@ -2157,7 +2157,7 @@ public class PApplet extends Applet
|
||||
//requestFocusInWindow();
|
||||
|
||||
// For 2.0, pass this to the renderer, to lend a hand to OpenGL
|
||||
g.requestFocus(PApplet.this);
|
||||
g.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -808,8 +808,10 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* 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();
|
||||
public void requestFocus() { // ignore
|
||||
if (parent != null) {
|
||||
parent.requestFocusInWindow();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user