mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
attempt to deal with focus issues
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user