From eeb3ed749bb66d5dab5c164b2fdff22a04639c6a Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 3 Nov 2024 06:49:58 -0500 Subject: [PATCH] panel: Use the wlroots backend with unknown Wayland compositors The description of the LXQtPanelApplicationPrivate::loadBackend() method already states that if we cannot identify the correct backend for a Wayland session, we should fall back to the wlroots backend module. This is reasonable given how broadly the wlr protocols are implemented. However, this was not happening due to a small error where we checked for the wlroots string in XDG_CURRENT_DESKTOP, which is not a valid option. This change fixes this by checking XDG_SESSION_TYPE for "wayland" instead. As this is fallback logic, this is safe as the preferred backend logic using XDG_CURRENT_DESKTOP still wins over this. --- panel/lxqtpanelapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/lxqtpanelapplication.cpp b/panel/lxqtpanelapplication.cpp index 1970204ac..fa7281e06 100644 --- a/panel/lxqtpanelapplication.cpp +++ b/panel/lxqtpanelapplication.cpp @@ -263,7 +263,7 @@ void LXQtPanelApplicationPrivate::loadBackend() } } - if ( preferredBackend.isEmpty() && xdgCurrentDesktops.contains( QStringLiteral("wlroots") ) ) + if ( preferredBackend.isEmpty() && xdgSessionType == QStringLiteral("wayland") ) ) { qDebug() << "Specialized backend unavailable. Falling back to generic wlroots"; preferredBackend = QStringLiteral("wlroots");