mirror of
https://github.com/processing/processing4.git
synced 2026-02-06 23:29:30 +01:00
[toxi] presentation mode working again
This commit is contained in:
@@ -96,18 +96,10 @@ public class PdeRuntime implements PdeMessageConsumer {
|
||||
applet.start();
|
||||
|
||||
if (editor.presenting) {
|
||||
window = new Window(new Frame());
|
||||
window.addKeyListener(new KeyAdapter() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
//System.out.println("window got " + e);
|
||||
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
||||
//editor.doClose();
|
||||
//new DelayedClose(editor);
|
||||
stop();
|
||||
editor.doClose();
|
||||
}
|
||||
}
|
||||
});
|
||||
//window = new Window(new Frame());
|
||||
// toxi_030903: attach applet window to editor's presentation window
|
||||
window = new Window(editor.presentationWindow);
|
||||
// toxi_030903: moved keyListener to PdeEditor's presentationWindow
|
||||
|
||||
} else {
|
||||
window = new Frame(editor.sketchName); // gonna use ugly windows instead
|
||||
@@ -121,10 +113,9 @@ public class PdeRuntime implements PdeMessageConsumer {
|
||||
editor.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!(window instanceof Frame)) y1 += parentInsets.top;
|
||||
window.add(applet);
|
||||
|
||||
|
||||
// toxi_030903: only attach keyListener if not in presentation mode
|
||||
// else events are coming directly from editor.presentationWindow
|
||||
applet.addKeyListener(new KeyAdapter() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
//System.out.println("applet got " + e);
|
||||
@@ -137,6 +128,13 @@ public class PdeRuntime implements PdeMessageConsumer {
|
||||
}
|
||||
});
|
||||
|
||||
y1 += parentInsets.top;
|
||||
}
|
||||
// toxi_030903: moved this in the above else branch
|
||||
// if (!(window instanceof Frame)) y1 += parentInsets.top;
|
||||
|
||||
window.add(applet);
|
||||
|
||||
// @#$((* java 1.3
|
||||
// removed because didn't seem to be needed anymore
|
||||
// also, was causing offset troubles
|
||||
|
||||
Reference in New Issue
Block a user