File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -581,11 +581,11 @@ protected void handleActivated(Editor whichEditor) {
581581
582582
583583 protected int [] nextEditorLocation () {
584- Dimension screen = Toolkit .getDefaultToolkit ().getScreenSize ();
585584 int defaultWidth = Preferences .getInteger ("editor.window.width.default" );
586585 int defaultHeight = Preferences .getInteger ("editor.window.height.default" );
587586
588587 if (activeEditor == null ) {
588+ Rectangle screen = GraphicsEnvironment .getLocalGraphicsEnvironment ().getDefaultScreenDevice ().getDefaultConfiguration ().getBounds ();
589589 // If no current active editor, use default placement
590590 return new int [] {
591591 (screen .width - defaultWidth ) / 2 ,
@@ -594,13 +594,15 @@ protected int[] nextEditorLocation() {
594594 };
595595
596596 } else {
597+ Dimension screen = Toolkit .getDefaultToolkit ().getScreenSize ();
598+
597599 // With a currently active editor, open the new window
598600 // using the same dimensions, but offset slightly.
599601 synchronized (editors ) {
600602 final int OVER = 50 ;
601603 // In release 0160, don't
602604 //location = activeEditor.getPlacement();
603- Editor lastOpened = editors . get ( editors . size () - 1 ) ;
605+ Editor lastOpened = activeEditor ;
604606 int [] location = lastOpened .getPlacement ();
605607 // Just in case the bounds for that window are bad
606608 location [0 ] += OVER ;
You can’t perform that action at this time.
0 commit comments