Skip to content

Commit 09c6a87

Browse files
hansonrhansonr
authored andcommitted
popup focus issue
1 parent 6f03e61 commit 09c6a87

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

sources/net.sf.j2s.java.core/src/javax/swing/PopupFactory.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -358,21 +358,25 @@ static Popup getHeavyWeightPopup(Component owner, Component contents,
358358
}
359359
}
360360

361-
if (popup == null ||
362-
((JWindow) popup.getComponent())
363-
.getFocusableWindowState() != focusPopup) {
364-
365-
if(popup != null) {
366-
// The recycled popup can't serve us well
367-
// dispose it and create new one
368-
popup._dispose();
369-
}
361+
if (popup == null
362+
363+
// ||
364+
// ((JWindow) popup.getComponent())
365+
// .getFocusableWindowState() != focusPopup
366+
//
367+
368+
) {
369+
//
370+
// if(popup != null) {
371+
// // The recycled popup can't serve us well
372+
// // dispose it and create new one
373+
// popup._dispose();
374+
// }
370375

371376
popup = new HeavyWeightPopup();
372377
}
373378

374379
popup.reset(owner, contents, ownerX, ownerY);
375-
376380
if(focusPopup) {
377381
JWindow wnd = (JWindow) popup.getComponent();
378382
wnd.setFocusableWindowState(true);

0 commit comments

Comments
 (0)