diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 2c7c35f02c..fb30e2b42a 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -1013,6 +1013,24 @@ void CClientDlg::ShowGeneralSettings ( int iTab ) ClientSettingsDlg.activateWindow(); } +#if defined( Q_OS_IOS ) +void CClientDlg::RaiseRestoredWindows() +{ + // the dialogs restored from the settings are shown in the constructor, i.e. before + // this window, so the main window is in front of them. Bring them forward again. + if ( ClientSettingsDlg.isVisible() ) + { + ClientSettingsDlg.raise(); + ClientSettingsDlg.activateWindow(); + } + + if ( ChatDlg.isVisible() ) + { + ChatDlg.raise(); + } +} +#endif + void CClientDlg::ShowChatWindow ( const bool bForceRaise ) { ChatDlg.show(); diff --git a/src/clientdlg.h b/src/clientdlg.h index b127231b27..2768c11458 100644 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -105,6 +105,10 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase const bool bMuteStream, QWidget* parent = nullptr ); +#if defined( Q_OS_IOS ) + void RaiseRestoredWindows(); +#endif + protected: void SetGUIDesign ( const EGUIDesign eNewDesign ); void SetMeterStyle ( const EMeterStyle eNewMeterStyle ); diff --git a/src/main.cpp b/src/main.cpp index f74148cc64..aab8afea75 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1011,6 +1011,11 @@ int main ( int argc, char** argv ) // show dialog ClientDlg.show(); +# if defined( Q_OS_IOS ) + // iOS has no window manager, so the main window is presented in front of + // the windows restored from the settings. Bring them forward again. + ClientDlg.RaiseRestoredWindows(); +# endif // Connect on startup if requested if ( !strConnOnStartupAddress.isEmpty() )