From 2971fb33f5a31d3e2400e1637e16216e4c4a1a1c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 15 Jan 2014 12:22:09 +0300 Subject: reload background image if reconnecting to other server. --- src/client.cpp | 6 ++++++ src/client.h | 2 ++ src/gui/windows/serverdialog.cpp | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/client.cpp b/src/client.cpp index 133be841f..289b4df0b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -3033,6 +3033,12 @@ bool Client::isKeyboardVisible() const #endif } +void Client::reloadWallpaper() +{ + if (mDesktop) + mDesktop->reloadWallpaper(); +} + #ifdef ANDROID #ifdef USE_SDL2 void Client::extractAssets() diff --git a/src/client.h b/src/client.h index b89996e26..c166b438b 100644 --- a/src/client.h +++ b/src/client.h @@ -321,6 +321,8 @@ public: void updateScreenKeyboard(const int height) { mKeyboardHeight = height; } + void reloadWallpaper(); + Window *openErrorDialog(const std::string &header, const std::string &message, const bool modal); diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 971f3c5a5..2a1ec8314 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -394,7 +394,10 @@ void ServerDialog::connectToSelectedServer() if (!LoginDialog::savedPasswordKey.empty()) { if (mServerInfo->hostname != LoginDialog::savedPasswordKey) + { LoginDialog::savedPassword.clear(); + client->reloadWallpaper(); + } } config.setValue("usePersistentIP", -- cgit v1.2.3-70-g09d2