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) {
581
581
582
582
583
583
protected int [] nextEditorLocation () {
584
- Dimension screen = Toolkit .getDefaultToolkit ().getScreenSize ();
585
584
int defaultWidth = Preferences .getInteger ("editor.window.width.default" );
586
585
int defaultHeight = Preferences .getInteger ("editor.window.height.default" );
587
586
588
587
if (activeEditor == null ) {
588
+ Rectangle screen = GraphicsEnvironment .getLocalGraphicsEnvironment ().getDefaultScreenDevice ().getDefaultConfiguration ().getBounds ();
589
589
// If no current active editor, use default placement
590
590
return new int [] {
591
591
(screen .width - defaultWidth ) / 2 ,
@@ -594,13 +594,15 @@ protected int[] nextEditorLocation() {
594
594
};
595
595
596
596
} else {
597
+ Dimension screen = Toolkit .getDefaultToolkit ().getScreenSize ();
598
+
597
599
// With a currently active editor, open the new window
598
600
// using the same dimensions, but offset slightly.
599
601
synchronized (editors ) {
600
602
final int OVER = 50 ;
601
603
// In release 0160, don't
602
604
//location = activeEditor.getPlacement();
603
- Editor lastOpened = editors . get ( editors . size () - 1 ) ;
605
+ Editor lastOpened = activeEditor ;
604
606
int [] location = lastOpened .getPlacement ();
605
607
// Just in case the bounds for that window are bad
606
608
location [0 ] += OVER ;
You can’t perform that action at this time.
0 commit comments