summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp1
-rw-r--r--src/gui/windows/serverdialog.cpp3
-rw-r--r--src/gui/windows/serverdialog.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 33b0ffbb0..4a22836c9 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1217,6 +1217,7 @@ int Client::gameExec()
mCurrentDialog = new ServerDialog(&mCurrentServer,
mConfigDir);
+ mCurrentDialog->postInit();
}
else
{
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index d1ec6f0df..a8895cad9 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -330,7 +330,10 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
addKeyListener(this);
loadWindowState();
+}
+void ServerDialog::postInit()
+{
setVisible(true);
mConnectButton->requestFocus();
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index 95bcda706..31ad9609a 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -104,6 +104,8 @@ class ServerDialog final : public Window,
A_DELETE_COPY(ServerDialog)
+ void postInit() override;
+
/**
* Destructor
*/