summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pincodemanager.cpp4
-rw-r--r--src/progs/dyecmd/client.cpp8
-rw-r--r--src/progs/dyecmd/client.h2
-rw-r--r--src/progs/manaplus/client.cpp8
-rw-r--r--src/progs/manaplus/client.h2
5 files changed, 24 insertions, 0 deletions
diff --git a/src/pincodemanager.cpp b/src/pincodemanager.cpp
index 541726f9c..6b254ba52 100644
--- a/src/pincodemanager.cpp
+++ b/src/pincodemanager.cpp
@@ -20,6 +20,8 @@
#include "pincodemanager.h"
+#include "client.h"
+
#include "gui/windows/okdialog.h"
#include "gui/windows/pincodedialog.h"
@@ -151,6 +153,8 @@ void PincodeManager::sendPincode(const std::string &pincode)
void PincodeManager::pinOk()
{
mState = PincodeState::None;
+ if (client)
+ client->focusWindow();
}
void PincodeManager::wrongPin()
diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp
index 9c43b18bf..40b2ad48f 100644
--- a/src/progs/dyecmd/client.cpp
+++ b/src/progs/dyecmd/client.cpp
@@ -801,6 +801,14 @@ void Client::windowRemoved(const Window *const window)
mCurrentDialog = nullptr;
}
+void Client::focusWindow()
+{
+ if (mCurrentDialog != nullptr)
+ {
+ mCurrentDialog->requestFocus();
+ }
+}
+
void Client::logVars()
{
#ifdef ANDROID
diff --git a/src/progs/dyecmd/client.h b/src/progs/dyecmd/client.h
index 88522e49a..89dd82e11 100644
--- a/src/progs/dyecmd/client.h
+++ b/src/progs/dyecmd/client.h
@@ -74,6 +74,8 @@ class Client final : public ActionListener
void windowRemoved(const Window *const window);
+ void focusWindow();
+
void slowLogic();
static bool isTmw();
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index bc5007884..504916ea7 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -1853,6 +1853,14 @@ void Client::windowRemoved(const Window *const window)
mCurrentDialog = nullptr;
}
+void Client::focusWindow()
+{
+ if (mCurrentDialog != nullptr)
+ {
+ mCurrentDialog->requestFocus();
+ }
+}
+
void Client::logVars()
{
#ifdef ANDROID
diff --git a/src/progs/manaplus/client.h b/src/progs/manaplus/client.h
index 20ac722a5..28ab7323e 100644
--- a/src/progs/manaplus/client.h
+++ b/src/progs/manaplus/client.h
@@ -88,6 +88,8 @@ class Client final : public ConfigListener,
void windowRemoved(const Window *const window);
+ void focusWindow();
+
void slowLogic();
ServerInfo &getCurrentServer()