Skip to content

Commit bf70153

Browse files
committed
bring back frameMoved() so that Python Mode can override it
1 parent deb30c4 commit bf70153

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

core/src/processing/core/PApplet.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10045,6 +10045,17 @@ public void windowMove(int x, int y) {
1004510045
}
1004610046

1004710047

10048+
/**
10049+
* When running from the PDE, this saves the window position for
10050+
* next time the sketch is run. Needs to remain a separate method
10051+
* so that it can be overridden by Python Mode.
10052+
*/
10053+
public void frameMoved(int newX, int newY) {
10054+
System.err.println(EXTERNAL_MOVE + " " + newX + " " + newY);
10055+
System.err.flush(); // doesn't seem to help or hurt
10056+
}
10057+
10058+
1004810059
/**
1004910060
* Internal use only: called by Surface objects to queue a position
1005010061
* event to call windowPositioned() when it's safe, which is after
@@ -10053,10 +10064,7 @@ public void windowMove(int x, int y) {
1005310064
*/
1005410065
public void postWindowMoved(int newX, int newY) {
1005510066
if (external && !fullScreen) {
10056-
// When running from the PDE, this saves the window position
10057-
// for next time the sketch is run.
10058-
System.err.println(EXTERNAL_MOVE + " " + newX + " " + newY);
10059-
System.err.flush(); // doesn't seem to help or hurt
10067+
frameMoved(newX, newY);
1006010068
}
1006110069

1006210070
windowEventQueue.put("x", newX);

0 commit comments

Comments
 (0)