From 264adf960a489348ae240e238cd26417ad24df61 Mon Sep 17 00:00:00 2001 From: muyuankai Date: Tue, 31 Oct 2023 11:38:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dwayland=E4=B8=8B?= =?UTF-8?q?=E9=97=AA=E9=BB=91=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复wayland下闪黑屏 Bug: https://pms.uniontech.com/bug-view-225881.html Log: 修复wayland下闪黑屏 --- src/backends/mpv/mpv_glwidget.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/backends/mpv/mpv_glwidget.cpp b/src/backends/mpv/mpv_glwidget.cpp index 8301102b..323ea94f 100644 --- a/src/backends/mpv/mpv_glwidget.cpp +++ b/src/backends/mpv/mpv_glwidget.cpp @@ -467,8 +467,8 @@ namespace dmr { connect(window()->windowHandle(), &QWindow::windowStateChanged, [=]() { QWidget* pTopWid = this->topLevelWidget(); bool rounded = !pTopWid->isFullScreen() && !pTopWid->isMaximized(); - //PANGU M900 - if(this->property("hardware").toString().contains("PANGU M900", Qt::CaseInsensitive)) { + //wayland + if(utils::check_wayland_env()) { rounded = true; } toggleRoundedClip(rounded); @@ -754,19 +754,6 @@ namespace dmr { m_renderContexRender = nullptr; m_renderContextUpdate = nullptr; m_bRawFormat = false; - QDBusInterface systemInfoInterface("com.deepin.daemon.SystemInfo", - "/com/deepin/daemon/SystemInfo", - "org.freedesktop.DBus.Properties", - QDBusConnection::sessionBus()); - qDebug() << "systemInfoInterface.isValid: " << systemInfoInterface.isValid(); - QDBusMessage replyCpu = systemInfoInterface.call("Get", "com.deepin.daemon.SystemInfo", "CPUHardware"); - QList outArgsCPU = replyCpu.arguments(); - QString CPUHardware = ""; - if (outArgsCPU.count()) { - CPUHardware = outArgsCPU.at(0).value().variant().toString(); - qInfo() << __FUNCTION__ << __LINE__ << "Current CPUHardware: " << CPUHardware; - } - setProperty("hardware", CPUHardware); } /*not used yet*/