From a799d4fe1e95a28354816b7ea00ed43fdc989964 Mon Sep 17 00:00:00 2001 From: Mars-cb Date: Sat, 17 Sep 2022 15:45:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dpgv=E5=8F=8C=E5=B1=8F?= =?UTF-8?q?=E4=B8=8B=E4=BB=85=E5=8D=95=E5=B1=8F=E6=98=BE=E7=A4=BA,?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=8B=94=E6=8E=89=E4=B8=A4=E4=B8=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BB=BB=E5=8A=A1=E6=A0=8F=E5=B4=A9=E6=BA=83=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 没有显示器的时候,qt会虚拟一个空的屏幕,这个时候任务栏没必要处理虚拟屏幕下size Log: 修复pgv双屏下仅单屏显示,同时拔掉两个显示任务栏崩溃的问题 Influence: 任务栏 Bug: https://pms.uniontech.com/bug-view-159531.html Change-Id: I011ce6f78a0260507e3aa0c5be12646baa879cd0 --- frame/util/multiscreenworker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frame/util/multiscreenworker.cpp b/frame/util/multiscreenworker.cpp index 6794da469..82b632b9c 100644 --- a/frame/util/multiscreenworker.cpp +++ b/frame/util/multiscreenworker.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2018 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2018 - 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: LGPL-3.0-or-later @@ -1320,6 +1320,8 @@ void MultiScreenWorker::resetDockScreen() /** *注意这里要先对parent()进行setFixedSize,在分辨率切换过程中,setGeometry可能会导致其大小未改变 */ + if (m_ds.current().isEmpty()) // wayland下当没有屏幕时连接时,qt会虚拟一个空的屏幕,空屏幕这里不处理,不然会导致崩溃 + return; parent()->setFixedSize(dockRect(m_ds.current()).size()); parent()->setGeometry(dockRect(m_ds.current())); qDebug() << "update dock geometry: " << dockRect(m_ds.current());