1
0
mirror of https://github.com/moparisthebest/davmail synced 2025-01-12 14:08:38 -05:00

Force toFront and requestFocus to bring windows to front

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1804 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-10-02 21:49:39 +00:00
parent 299fac9c8e
commit 4ac9ad241b
7 changed files with 25 additions and 4 deletions

View File

@ -117,6 +117,8 @@ public class AcceptCertificateDialog extends JDialog {
getToolkit().getScreenSize().height / 2 -
getSize().height / 2);
setVisible(true);
toFront();
requestFocus();
}
protected JPanel getButtonPanel() {

View File

@ -134,6 +134,7 @@ public class NotificationDialog extends JDialog {
getSize().height / 2);
bodyField.requestFocus();
setVisible(true);
toFront();
requestFocus();
}

View File

@ -92,6 +92,7 @@ public class PasswordPromptDialog extends JDialog {
getToolkit().getScreenSize().height / 2 -
getSize().height / 2);
setVisible(true);
toFront();
requestFocus();
}

View File

@ -83,6 +83,7 @@ public class SelectCertificateDialog extends JDialog {
getToolkit().getScreenSize().height / 2 -
getSize().height / 2);
setVisible(true);
toFront();
requestFocus();
}

View File

@ -148,6 +148,8 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
public void run() {
aboutFrame.update();
aboutFrame.setVisible(true);
aboutFrame.toFront();
aboutFrame.requestFocus();
}
});
}
@ -160,6 +162,8 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
public void run() {
settingsFrame.reload();
settingsFrame.setVisible(true);
settingsFrame.toFront();
settingsFrame.requestFocus();
}
});
}
@ -273,6 +277,8 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
// display settings frame on first start
if (Settings.isFirstStart()) {
settingsFrame.setVisible(true);
settingsFrame.toFront();
settingsFrame.requestFocus();
}
}

View File

@ -144,6 +144,8 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
public void run() {
aboutFrame.update();
aboutFrame.setVisible(true);
aboutFrame.toFront();
aboutFrame.requestFocus();
}
});
}
@ -156,6 +158,8 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
public void run() {
settingsFrame.reload();
settingsFrame.setVisible(true);
settingsFrame.toFront();
settingsFrame.requestFocus();
}
});
}
@ -312,6 +316,8 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
// display settings frame on first start
if (Settings.isFirstStart()) {
settingsFrame.setVisible(true);
settingsFrame.toFront();
settingsFrame.requestFocus();
}
}
}

View File

@ -234,6 +234,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
}
aboutFrame.update();
aboutFrame.setVisible(true);
aboutFrame.toFront();
aboutFrame.requestFocus();
}
});
}
@ -250,8 +252,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
}
settingsFrame.reload();
settingsFrame.setVisible(true);
// workaround for focus on first open
settingsFrame.setVisible(true);
settingsFrame.toFront();
settingsFrame.requestFocus();
}
});
}
@ -271,8 +273,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
}
settingsFrame.reload();
settingsFrame.setVisible(true);
// workaround for focus on first open
settingsFrame.setVisible(true);
settingsFrame.toFront();
settingsFrame.requestFocus();
}
});
}
@ -321,6 +323,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
settingsFrame = new SettingsFrame();
}
settingsFrame.setVisible(true);
settingsFrame.toFront();
settingsFrame.requestFocus();
}
synchronized (mainThread) {