diff --git a/processing/app/KjcEngine.java b/processing/app/KjcEngine.java index 4acd5d958..a6197adb9 100644 --- a/processing/app/KjcEngine.java +++ b/processing/app/KjcEngine.java @@ -729,7 +729,21 @@ public class KjcEngine extends PdeEngine { int mh = PdeBase.getInteger("run.window.height.minimum", 120); int ww = Math.max(applet.width, mw) + insets.left + insets.right; int wh = Math.max(applet.height, mh) + insets.top + insets.bottom; - window.setBounds(x1 - ww, y1, ww, wh); + if (x1 - ww > 10) { // if it fits to the left of the window + window.setBounds(x1 - ww, y1, ww, wh); + + } else { // if it fits inside the editor window + x1 = parentLoc.x + PdeEditor.GRID_SIZE * 2; + y1 = parentLoc.y + PdeEditor.GRID_SIZE * 2; + + if ((x1 + ww > screen.width - PdeEditor.GRID_SIZE) || + (y1 + wh > screen.height - PdeEditor.GRID_SIZE)) { + // otherwise center on screen + x1 = (screen.width - ww) / 2; + y1 = (screen.height - wh) / 2; + } + window.setBounds(x1, y1, ww, wh); + } Color windowBgColor = PdeBase.getColor("run.window.bgcolor", SystemColor.control); diff --git a/processing/todo.txt b/processing/todo.txt index 63dab3e26..c94f2033d 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -16,20 +16,21 @@ X there was a bug that required a noop() b/c of jikes or 1.3 problems X is problem w/ beautify that it has no menu event handler? X write event handler, and make sure it doesn't work for external ed - bagel _ need to finish fill mode of flat circle function _ 'image' is too generic a variable to have inside BApplet _ check for others that shouldn't be used pde -_ don't popup offscreen if editor window is way left. -_ just make sure the x coord > 10 or so (if not presenting) -_ don't throw exceptions for serial on startup if no serial available? -_ gets upset on osx if rxtx not installed during menu building -_ as approaches 1000 lines, editorconsole has arrayindexoutof bounds +44 _ don't popup offscreen if editor window is way left. +44 _ just make sure the x coord > 10 or so (if not presenting) +44 _ if so, pop up window 50, 50 from upper left corner +44 _ if it still won't fit, center the window on screen +44 _ don't throw exceptions for serial on startup if no serial available? +44 _ gets upset on osx if rxtx not installed during menu building +44 _ as approaches 1000 lines, editorconsole has arrayindexoutof bounds int a; -void loop() +void loop() { a++; println(a); @@ -38,34 +39,36 @@ _ locking up on run (under win2k? others?) _ rare but present, every 100th time or so readme -_ mention shift-run for present mode -_ size() and background() need regular nums, no vars -_ click sketch title to rename +44 _ size() and background() need regular nums, no vars +44 _ hidden features/niceties +44 _ click sketch title to rename +44 _ mention shift-run for present mode +44 _ known issues +44 _ macos sketch window resizing strangely +44 _ win95/98/me version acts poorly or doesn't run windows -_ use self-extractor and make sure no 8.3 filenames +44 _ use self-extractor and make sure no 8.3 filenames _ windows 95/98/ME seems to be broken _ ME seems to be very broken macos -_ console scroller obscured by window resizer intruding -_ make sure space->underscore conversion working properly for 'save as' -_ file names with a space get "_ " instead of a space ? +44 _ console scroller obscured by window resizer intruding +44 _ make sure space->underscore conversion working properly for 'save as' +44 _ file names with a space get "_ " instead of a space ? macosx -_ include instructions for rxtx or the install itself -_ just include the .pkg, since causing exceptions now -_ use a .dmg to distribute -o viewer window shows up in odd places -_ arrow keys broken (but with shift they work..) -_ escape key not quitting presentation mode -_ apple-a for select all tries to quit +44 _ include instructions for rxtx or the install itself +44 _ just include the .pkg, since causing exceptions now +44 _ use a .dmg to distribute +44 _ arrow keys broken (but with shift they work..) +44 _ escape key not quitting presentation mode +44 _ apple-a for select all tries to quit _ sketch window resizing strangely _ can make width/height larger, but only height smaller X check apple site for technote/bug listing X jes grabbed examples for me - suggestions _ make versions available w/o fonts and jre _ lock feature for present mode (part of export to application?)