Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e9003cd

Browse files
facchinmcmaglie
authored andcommitted
Find/Replace: display on top of the related Editor
If the editor is focused, acquire alwaysOnTop capabilities but drop them as soon as both the editor and the dialog are out of focus
1 parent 3d3bb38 commit e9003cd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎app/src/cc/arduino/view/findreplace/FindReplace.java‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,24 @@ public FindReplace(Editor editor, Map<String, Object> state) {
7373

7474
Base.setIcon(this);
7575

76+
editor.addWindowListener(new WindowAdapter() {
77+
public void windowActivated(WindowEvent e) {
78+
findField.requestFocusInWindow();
79+
findField.selectAll();
80+
setAlwaysOnTop(true);
81+
}
82+
public void windowDeactivated(WindowEvent e) {
83+
setAlwaysOnTop(false);
84+
}
85+
});
86+
7687
addWindowListener(new WindowAdapter() {
7788
public void windowActivated(WindowEvent e) {
7889
findField.requestFocusInWindow();
7990
findField.selectAll();
91+
setAlwaysOnTop(true);
92+
}
93+
public void windowDeactivated(WindowEvent e) {
8094
}
8195
});
8296

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /