Problem with initial position of window
in
Programming Questions
•
1 year ago
Processing 1.5.1 in Linux (Fedora 14)
My application has five separate windows (frames) which I wish to arrange in a particular layout.
All except the first (main) window behave as expected but the first fails to position itself on the first run of a session.
The code is -
void setup() {
// The Main frame
size(1000, 100, P2D);
frame.setLocation(0,0);
frame.setTitle("Sunlight Calculator");
frame.setResizable(true);
frameRate(10); // Default is 60
font = createFont("Liberation Serif Italic", 12, true);
textFont(font);
fill(#000000);
textMode(SCREEN);
... and more ....
On the first run of a session it opens at the default, middle-of-screen, position.
On second and subsequent executions it starts correctly positioned at (0,0), even after exiting Processing and re-opening the sketch file.
It is only after shutting down the machine and re-starting that the mis-behaviour occurs just the once.
In development terms it is only a minor inconvenience but -
a) it will stop me from publishing the work and
b) it might be of interest to you as a symptom of some deeper problem in the system (memory leak etc?)
Any suggestions on how to set about tracking this down?
My application has five separate windows (frames) which I wish to arrange in a particular layout.
All except the first (main) window behave as expected but the first fails to position itself on the first run of a session.
The code is -
void setup() {
// The Main frame
size(1000, 100, P2D);
frame.setLocation(0,0);
frame.setTitle("Sunlight Calculator");
frame.setResizable(true);
frameRate(10); // Default is 60
font = createFont("Liberation Serif Italic", 12, true);
textFont(font);
fill(#000000);
textMode(SCREEN);
... and more ....
On the first run of a session it opens at the default, middle-of-screen, position.
On second and subsequent executions it starts correctly positioned at (0,0), even after exiting Processing and re-opening the sketch file.
It is only after shutting down the machine and re-starting that the mis-behaviour occurs just the once.
In development terms it is only a minor inconvenience but -
a) it will stop me from publishing the work and
b) it might be of interest to you as a symptom of some deeper problem in the system (memory leak etc?)
Any suggestions on how to set about tracking this down?
2