Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
cf887a1 to
708bd96
Compare
8adbd23 to
31e8788
Compare
|
Scope note on the guard: the same ordering problem might exist on desktop too. There the main window is also activated after the windows restored in the constructor, so a restored chat or settings window could end up behind it in the same way. I could only test iOS, so the call is guarded with
|
31e8788 to
7138e27
Compare
… shown The settings and chat windows that were open when the application was quit are shown in the CClientDlg constructor, i.e. before the main window exists. On iOS, which has no window manager, the main window is then presented in front of them and the chat is unreachable until the Chat check box is toggled. Bring the restored windows forward once the main window is shown. The call is guarded to iOS so that the behaviour on the other platforms is unchanged.
7138e27 to
6c06108
Compare
|
The proper fix would be to store relative Z-index along with position of each window, maybe, then display the created windows in the correct order. Currently it's a bit hit and miss where they appear on Windows and Linux. |
|
🤖 AI: On desktop Linux the ordering bug reproduces only without a window manager, and dropping the |
Short description of changes
Bring the windows restored from the settings forward once the main window is shown, so the chat window no longer ends up behind it. Otherwise the checkbox is checked, but the window does not show up. The user would have needed to retap the LED to make it show up.
CClientDlgshows the settings and chat windows from its constructor (whenwinvisset/winvischatare set), i.e. before the main window exists. On iOS there is no window manager, so the main window is presented in front of them; the chat is invisible and unreachable until the Chat check box is toggled off and on.main()now callsCClientDlg::RaiseRestoredWindows()right afterClientDlg.show(), which raises the settings and chat windows if they were restored. The ordering is explicit: the main window is up, then the windows that were open before it are brought forward. No timer, no extra event loop pass.The call is guarded with
#if defined( Q_OS_IOS ), because this was only observed on iOS. It is possible that desktop platforms have the same ordering problem, since the main window is activated after the restored dialogs there as well; that remains to be tested, so the behaviour on Windows, Linux and macOS is deliberately left unchanged for now.An earlier attempt that raised the chat window from
CClientDlg::showEvent()was dropped:showEventis delivered before the platform window is presented, so the raise had no effect unless it was deferred with a zero timer, which depends on timing rather than order.CHANGELOG: iOS: Fixed the chat window being hidden behind the main window on startup
Context: Fixes an issue?
Fixes #3994 (first item). Also relevant to #3383.
The same ordering problem applied to the settings window when
winvissetis set, so that is handled too.Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
Working implementation.
What is missing until this pull request can be merged?
Tested on the iPad Pro 11-inch simulator (iOS 27.2) with Qt 6.11.1, on top of Only compile the iOS app delegate for Qt 5 #3988, because
maindoes not launch on iOS with Qt 6 without it. Without Only compile the iOS app delegate for Qt 5 #3988 the app dies at startup withEXC_BREAKPOINTin___UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption_block_invoke, so this could not be tested on plainmain.winvischat=1winvisset=10Not tested on a physical device, and not on Windows/Linux/macOS. The call is unconditional, but on those platforms the main window is activated the same way, so the behaviour should be unchanged or slightly more correct.
The chat window can only be closed from its own menu, so the "was shown" flag is only stored on quit via
closeEvent(). That is untouched here; recovering the chat state after the app is killed is part of the settings persistence item in AI bug findings for iOS #3994.