Skip to content

Commit ec0ba05

Browse files
hansonrhansonr
authored andcommitted
focus peer fix for should not set focus to applet window
1 parent a0e6377 commit ec0ba05

File tree

6 files changed

+5
-4
lines changed

6 files changed

+5
-4
lines changed
125 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20190304233937
1+
20190306180548
125 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20190304233937
1+
20190306180548
125 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/swingjs/JSFocusPeer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class JSFocusPeer implements KeyboardFocusManagerPeer {
3535
@Override
3636
public void setCurrentFocusedWindow(Window win) {
3737
currentWindow = win;
38-
setCurrentFocusOwner(win);
38+
// setCurrentFocusOwner(win);
3939
}
4040

4141
@Override
@@ -143,7 +143,8 @@ public void checkFrameFocusOnMouseDown(AWTEvent e) {
143143
Container p = JSComponent.getTopInvokableAncestor((Container) e.getSource(), true);
144144
if (getCurrentFocusOwner() != null && p == currentWindow)
145145
return;
146-
handleJSFocus(p, currentWindow, true);
146+
//oops, windows do not report focus gained
147+
// handleJSFocus(p, currentWindow, true);
147148
setCurrentFocusedWindow((Window) p);
148149
if (p instanceof JInternalFrame) {
149150
try {

0 commit comments

Comments
 (0)