diff --git a/app/gui/main.qml b/app/gui/main.qml index 58d1b4bf..508f67b3 100644 --- a/app/gui/main.qml +++ b/app/gui/main.qml @@ -44,6 +44,24 @@ ApplicationWindow { } else { window.showFullScreen() } + + // Display any modal dialogs for configuration warnings + if (SystemProperties.isWow64) { + wow64Dialog.open() + } + else if (!SystemProperties.hasHardwareAcceleration) { + if (SystemProperties.isRunningXWayland) { + xWaylandDialog.open() + } + else { + noHwDecoderDialog.open() + } + } + + if (SystemProperties.unmappedGamepads) { + unmappedGamepadDialog.unmappedGamepads = SystemProperties.unmappedGamepads + unmappedGamepadDialog.open() + } } // This configures the maximum width of the singleton attached QML ToolTip. If left unconstrained, @@ -160,41 +178,6 @@ ApplicationWindow { } } - property bool initialized: false - - // BUG: Using onAfterSynchronizing: here causes very strange - // failures on Linux. Many shaders fail to compile and we - // eventually segfault deep inside the Qt OpenGL code. - onAfterRendering: { - // We use this callback to trigger dialog display because - // it only happens once the window is fully constructed. - // Doing it earlier can lead to the dialog appearing behind - // the window or otherwise without input focus. - if (!initialized) { - // Set initialized before calling anything else, because - // pumping the event loop can cause us to get another - // onAfterRendering call and potentially reenter this code. - initialized = true; - - if (SystemProperties.isWow64) { - wow64Dialog.open() - } - else if (!SystemProperties.hasHardwareAcceleration) { - if (SystemProperties.isRunningXWayland) { - xWaylandDialog.open() - } - else { - noHwDecoderDialog.open() - } - } - - if (SystemProperties.unmappedGamepads) { - unmappedGamepadDialog.unmappedGamepads = SystemProperties.unmappedGamepads - unmappedGamepadDialog.open() - } - } - } - // Workaround for lack of instanceof in Qt 5.9. // // Based on https://stackoverflow.com/questions/13923794/how-to-do-a-is-a-typeof-or-instanceof-in-qml