summaryrefslogtreecommitdiff
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2023-03-28 01:16:56 +0400
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-04-03 16:41:51 +0000
commit5b64b363bf9c8a8a14e292de5ddf361f68917e26 (patch)
tree08f518fb54ac6e552620e9b12d7e574046c5b1ac /src/client/qwaylanddisplay.cpp
parent23a026cd33582f2ca65dabfd45a3ed33f1a7da71 (diff)
downloadqtwayland-5b64b363bf9c8a8a14e292de5ddf361f68917e26.tar.gz
Client: Check for shell integration when initializing platform plugin
This makes QWaylandDisplay::initialize return a boolean and moves the QWaylandIntegration's failure check out of constructor as QWaylandIntegration::shellIntegration is a virtual method, this also removes the out-of-date comments about processEvents as it's no more used in QWaylandDisplay::forceRoundTrip. Fixes: QTBUG-102457 Change-Id: I3c8f1d9fd195326b587b45318443c2beee1ebfc2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit 2eb17abf4262b467140ed4262320bf60cbda3ba2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 2bf09331..bb88a688 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -380,8 +380,11 @@ QWaylandDisplay::~QWaylandDisplay(void)
// Steps which is called just after constructor. This separates registry_global() out of the constructor
// so that factory functions in integration can be overridden.
-void QWaylandDisplay::initialize()
+bool QWaylandDisplay::initialize()
{
+ if (!isInitialized())
+ return false;
+
forceRoundTrip();
if (!mWaitingScreens.isEmpty()) {
@@ -390,6 +393,8 @@ void QWaylandDisplay::initialize()
}
if (!mClientSideInputContextRequested)
mTextInputManagerIndex = INT_MAX;
+
+ return qEnvironmentVariableIntValue("QT_WAYLAND_DONT_CHECK_SHELL_INTEGRATION") || shellIntegration();
}
void QWaylandDisplay::ensureScreen()