mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-15 01:52:21 +08:00
fix: 修改 treeland 环境判断条件
修改读取的环境变量名称为 DDE_CURRENT_COMPOSITOR,避免后续修改造成的不兼容问题 Log: 修改 treeland 环境判断条件;去除 dwayland 平台插件调用
This commit is contained in:
parent
37057306bb
commit
e9a52da098
@ -80,8 +80,7 @@ bool Utils::isWayland()
|
||||
bool Utils::isTreeLand()
|
||||
{
|
||||
bool isTreeLand = false;
|
||||
if (qgetenv("DDE_CURRENT_COMPOSITER").toLower() == "treeland"
|
||||
|| qgetenv("DESKTOP_SESSION").toLower() == "treeland") {
|
||||
if (qgetenv("DDE_CURRENT_COMPOSITOR").toLower() == "treeland") {
|
||||
isTreeLand = true;
|
||||
}
|
||||
|
||||
@ -185,14 +184,18 @@ void Utils::setQPAPlatform()
|
||||
|
||||
qDebug() << "System Wayland enabled:" << isWayland << "Spark Wayland enabled:" << useWayland;
|
||||
|
||||
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDeepin() || isDDE))
|
||||
/**
|
||||
* NOTE: https://github.com/linuxdeepin/developer-center/issues/7217#issuecomment-1922653903
|
||||
* DDE Wayland has been deprecated, so using wayland plugin only
|
||||
*/
|
||||
if (isWayland && useWayland /*&& !(Dtk::Core::DSysInfo::isDeepin() || isDDE)*/)
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "wayland");
|
||||
}
|
||||
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDeepin() && isDDE))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dwayland");
|
||||
}
|
||||
// else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDeepin() && isDDE))
|
||||
// {
|
||||
// qputenv("QT_QPA_PLATFORM", "dwayland");
|
||||
// }
|
||||
else
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dxcb");
|
||||
|
Loading…
x
Reference in New Issue
Block a user