Skip to content

Commit

Permalink
fix: 修复wayland下闪黑屏
Browse files Browse the repository at this point in the history
修复wayland下闪黑屏

Bug: https://pms.uniontech.com/bug-view-225881.html
Log: 修复wayland下闪黑屏
  • Loading branch information
myk1343 committed Oct 31, 2023
1 parent d73aa78 commit 264adf9
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/backends/mpv/mpv_glwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<QVariant> outArgsCPU = replyCpu.arguments();
QString CPUHardware = "";
if (outArgsCPU.count()) {
CPUHardware = outArgsCPU.at(0).value<QDBusVariant>().variant().toString();
qInfo() << __FUNCTION__ << __LINE__ << "Current CPUHardware: " << CPUHardware;
}
setProperty("hardware", CPUHardware);
}

/*not used yet*/
Expand Down

0 comments on commit 264adf9

Please sign in to comment.