From 916ab6482bdc5b00e7704b47ebf1fd4f1b5a66ab Mon Sep 17 00:00:00 2001 From: chenjun Date: Thu, 23 Sep 2021 16:20:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A4=E6=96=AD=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E5=9D=90=E6=A0=87=E6=97=B6=E9=9C=80=E8=A6=81=E8=80=83=E8=99=91?= =?UTF-8?q?=E5=9C=A8=E6=98=BE=E7=A4=BA=E5=99=A8=E8=BE=B9=E7=BC=98=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在多显示器拼接时,鼠标在拼接处移动时,需要考虑鼠标坐标不在显示器的rect区域内,需要单独处理 Log: 修复扩展模式下任务栏跟随主屏时任务栏会在副屏闪烁问题 Bug: https://pms.uniontech.com/zentao/bug-view-94504.html Change-Id: I36a434bd5d385735ebfa9f1c4d01c31c830f84d2 --- frame/util/multiscreenworker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/util/multiscreenworker.cpp b/frame/util/multiscreenworker.cpp index 4980004b5..dc751a5b7 100644 --- a/frame/util/multiscreenworker.cpp +++ b/frame/util/multiscreenworker.cpp @@ -1455,13 +1455,13 @@ bool MultiScreenWorker::onScreenEdge(const QString &screenName, const QPoint &po // 除了要判断鼠标的x坐标和当前区域的位置外,还需要判断当前的坐标的y坐标是否在任务栏的区域内 // 因为有如下场景:任务栏在左侧,双屏幕屏幕上下拼接,此时鼠标沿着最左侧x=0的位置移动到另外一个屏幕 // 如果不判断y坐标的话,此时就认为鼠标在当前任务栏的边缘,导致任务栏在这种状况下没有跟随鼠标 - if ((rect.x() == point.x() || rect.right() == point.x()) + if ((rect.x() == point.x() || rect.x() + rect.width() == point.x()) && point.y() >= rect.top() && point.y() <= rect.bottom()) { return true; } // 同上,不过此时屏幕是左右拼接,任务栏位于上方或者下方 - if ((rect.y() == point.y() || rect.bottom() == point.y()) + if ((rect.y() == point.y() || rect.y() + rect.height() == point.y()) && point.x() >= rect.left() && point.x() <= rect.right()) { return true; }