lxqt-panel/0003-use-wlroots-backend-with-unknown-compositors.patch

36 lines
1.5 KiB
Diff
Raw Normal View History

From aaea8c090aa7af9c3ac8e73122dbf7cb3cad1d04 Mon Sep 17 00:00:00 2001
From: "Shawn W. Dunn" <sfalken@cloverleaf-linux.org>
Date: Thu, 16 Jan 2025 09:45:41 -0800
Subject: [PATCH 3/3] use wlroots backend with unknown 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 c8948cc..baf37a0 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");
--
2.48.0