@@ -72,9 +72,7 @@ public FindReplace(Editor editor, Map<String, Object> state) {
72
72
}
73
73
74
74
Base .registerWindowCloseKeys (getRootPane (), e -> {
75
- if (OSUtils .isWindows ()) {
76
- setAutoRequestFocus (true );
77
- }
75
+ setAutoRequestFocus (true );
78
76
setVisible (false );
79
77
Base .FIND_DIALOG_STATE = findDialogState ();
80
78
});
@@ -83,39 +81,17 @@ public FindReplace(Editor editor, Map<String, Object> state) {
83
81
84
82
editor .addWindowListener (new WindowAdapter () {
85
83
public void windowActivated (WindowEvent e ) {
86
- if (OSUtils .isWindows ()) {
87
- toFront ();
88
- setAutoRequestFocus (false );
89
- return ;
90
- }
91
- findField .requestFocusInWindow ();
92
- findField .selectAll ();
93
- setAlwaysOnTop (true );
94
- if (useTranslucency ) {
95
- // Window is decorated, so tranparency doesn't work :(
96
- //setOpacity(0.7f);
97
- }
84
+ toFront ();
85
+ setAutoRequestFocus (false );
98
86
}
99
87
public void windowDeactivated (WindowEvent e ) {
100
- if (OSUtils .isWindows ()) {
101
88
return ;
102
- }
103
- setAlwaysOnTop (false );
104
89
}
105
90
});
106
91
107
92
addWindowListener (new WindowAdapter () {
108
93
public void windowActivated (WindowEvent e ) {
109
- if (OSUtils .isWindows ()) {
110
94
return ;
111
- }
112
- findField .requestFocusInWindow ();
113
- findField .selectAll ();
114
- setAlwaysOnTop (true );
115
- if (useTranslucency ) {
116
- // Window is decorated, so tranparency doesn't work :(
117
- //setOpacity(1.0f);
118
- }
119
95
}
120
96
public void windowDeactivated (WindowEvent e ) {
121
97
}
@@ -127,12 +103,8 @@ public void windowDeactivated(WindowEvent e) {
127
103
@ Override
128
104
public void setVisible (boolean b ) {
129
105
getRootPane ().setDefaultButton (findButton );
130
-
131
- if (OSUtils .isWindows ()) {
132
- // means we are restoring the window visibility
133
- setAutoRequestFocus (true );
134
- }
135
-
106
+ // means we are restoring the window visibility
107
+ setAutoRequestFocus (true );
136
108
super .setVisible (b );
137
109
}
138
110
0 commit comments