View Single Post
Old 09-04-2024, 10:01 AM   #73
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,841
Karma: 6120478
Join Date: Nov 2009
Device: many
There is one other change I would like people to try ...

In the old Qt5 days, we had to manually record if a Window was Maximized or FullScreen in the settings and then manually restore it to that state in MainWindow.cpp ReadSettings.

Given all the fixes to Qt6 related to restoring state, I commented out the calls to showMaximized() and showFullScreen() (see the following lines) in MainWindow.cpp in ReadSettings() that ended up generating an alternative path to when the MainWindow actually appeared (which helped cause the races and related crashes).

Code:
    QByteArray lastWindowSize = settings.value("geometry", QByteArray()).toByteArray();
    if (!lastWindowSize.isEmpty()) restoreGeometry(lastWindowSize);

    if (MaximizedState) {
        // showMaximized();
    } else if (FullScreenState) {
        // showFullScreen();
    }

And Qt6 (at least on macOS) no longer needs special handling for being maxmized or full screen as it is properly recorded and restored now.

So if people on Linux and Windows could test that change above to see if Sigil properly remembers and restores Maximized and Full Screen for the next launch without those calls, it might save a bunch of race related issues down the road making first launch much more robust.


Thanks!
KevinH is offline   Reply With Quote