bring back frameMoved() so that Python Mode can override it

This commit is contained in:
Ben Fry
2022-03-03 11:59:09 -05:00
parent deb30c40c6
commit bf701532ca
+12 -4
View File
@@ -10045,6 +10045,17 @@ public class PApplet implements PConstants {
}
/**
* When running from the PDE, this saves the window position for
* next time the sketch is run. Needs to remain a separate method
* so that it can be overridden by Python Mode.
*/
public void frameMoved(int newX, int newY) {
System.err.println(EXTERNAL_MOVE + " " + newX + " " + newY);
System.err.flush(); // doesn't seem to help or hurt
}
/**
* Internal use only: called by Surface objects to queue a position
* event to call windowPositioned() when it's safe, which is after
@@ -10053,10 +10064,7 @@ public class PApplet implements PConstants {
*/
public void postWindowMoved(int newX, int newY) {
if (external && !fullScreen) {
// When running from the PDE, this saves the window position
// for next time the sketch is run.
System.err.println(EXTERNAL_MOVE + " " + newX + " " + newY);
System.err.flush(); // doesn't seem to help or hurt
frameMoved(newX, newY);
}
windowEventQueue.put("x", newX);