From 8fe6e169574f8de77140ae4dfe4b443230d06fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E6=9C=8B=E7=A8=8B?= Date: Sat, 20 Jun 2020 17:14:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E5=88=86=E8=BE=A8=E7=8E=87=E5=AF=BC=E8=87=B4=E7=9A=84=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=A0=8F=E9=9A=90=E8=97=8F=E5=90=8E=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=94=A4=E8=B5=B7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 任务栏监听区域信息没有在分辨率切换时更新,导致分辨率修改后,监听的区域实际上已经是屏幕外部了, Log: 设置任务栏状态为一直隐藏,调整分辨后,任务栏无法唤醒 Bug: https://pms.uniontech.com/zentao/bug-view-34444.html --- frame/util/docksettings.cpp | 2 ++ frame/util/docksettings.h | 2 ++ frame/window/mainwindow.cpp | 1 + 3 files changed, 5 insertions(+) diff --git a/frame/util/docksettings.cpp b/frame/util/docksettings.cpp index d8c42cbf1..33a6a210c 100644 --- a/frame/util/docksettings.cpp +++ b/frame/util/docksettings.cpp @@ -691,6 +691,8 @@ void DockSettings::monitorAdded(const QString &path) connect(inter, &MonitorInter::YChanged, mon, &Monitor::setY); connect(inter, &MonitorInter::WidthChanged, mon, &Monitor::setW); connect(inter, &MonitorInter::HeightChanged, mon, &Monitor::setH); + connect(inter, &MonitorInter::WidthChanged, this, &DockSettings::requestUpdateRegionWatch); + connect(inter, &MonitorInter::HeightChanged, this, &DockSettings::requestUpdateRegionWatch); connect(inter, &MonitorInter::MmWidthChanged, mon, &Monitor::setMmWidth); connect(inter, &MonitorInter::MmHeightChanged, mon, &Monitor::setMmHeight); connect(inter, &MonitorInter::RotationChanged, mon, &Monitor::setRotate); diff --git a/frame/util/docksettings.h b/frame/util/docksettings.h index 1b4984152..e030e61a5 100644 --- a/frame/util/docksettings.h +++ b/frame/util/docksettings.h @@ -93,6 +93,8 @@ signals: void windowGeometryChanged() const; void opacityChanged(const quint8 value) const; void trayCountChanged() const; + // 分标率发生变化,需要更新XEventMonitor的监视区域 + void requestUpdateRegionWatch(); public slots: void updateGeometry(); diff --git a/frame/window/mainwindow.cpp b/frame/window/mainwindow.cpp index 6a88bc8de..793f3bd78 100755 --- a/frame/window/mainwindow.cpp +++ b/frame/window/mainwindow.cpp @@ -504,6 +504,7 @@ void MainWindow::initConnections() connect(m_dragWidget, &DragWidget::dragFinished, this, &MainWindow::onDragFinished); connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &MainWindow::themeTypeChanged); connect(m_eventInter, &XEventMonitor::CursorMove, this, &MainWindow::onRegionMonitorChanged); + connect(m_settings,&DockSettings::requestUpdateRegionWatch,this,&MainWindow::updateRegionMonitorWatch); } //const QPoint MainWindow::x11GetWindowPos()