Skip to content

Commit c3d7b6d

Browse files
committed
Show the chat window full screen on iOS
The chat dialog keeps the size from its .ui file (435x405), which is wider than a phone screen in portrait, and Qt's iOS plugin does not bring a top level window to the front when it is shown for the first time. Show it maximized and raise it, like the connect dialog does since #3343. Skip showNormal() on iOS, as that clears the maximized state again.
1 parent 19c50e5 commit c3d7b6d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/clientdlg.cpp‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,10 +1018,18 @@ void CClientDlg::ShowChatWindow ( const bool bForceRaise )
10181018
ChatDlg.show();
10191019
ChatDlg.setWindowTitle ( MakeClientNameTitle ( tr ( "Chat" ), pClient->strClientName ) );
10201020

1021+
#if defined( Q_OS_IOS )
1022+
// iOS has no window manager. Thus we need to force full screen and raise
1023+
ChatDlg.showMaximized();
1024+
ChatDlg.raise();
1025+
#endif
1026+
10211027
if ( bForceRaise )
10221028
{
10231029
// make sure dialog is upfront and has focus
1030+
#if !defined( Q_OS_IOS )
10241031
ChatDlg.showNormal();
1032+
#endif
10251033
ChatDlg.raise();
10261034
ChatDlg.activateWindow();
10271035
}

0 commit comments

Comments
 (0)