diff --git a/frame/util/multiscreenworker.cpp b/frame/util/multiscreenworker.cpp index 39fca86f6..3d9b9e6bf 100644 --- a/frame/util/multiscreenworker.cpp +++ b/frame/util/multiscreenworker.cpp @@ -756,11 +756,6 @@ void MultiScreenWorker::onRequestUpdatePosition(const Position &fromPos, const P changeDockPosition(m_ds.last(), m_ds.current(), fromPos, toPos); } -void MultiScreenWorker::onRequestUpdateDragArea() -{ - parent()->resetDragWindow(); -} - void MultiScreenWorker::onRequestUpdateMonitorInfo() { #ifdef QT_DEBUG @@ -990,7 +985,6 @@ void MultiScreenWorker::initConnection() connect(this, &MultiScreenWorker::requestUpdateFrontendGeometry, this, &MultiScreenWorker::onRequestUpdateFrontendGeometry); connect(this, &MultiScreenWorker::requestUpdatePosition, this, &MultiScreenWorker::onRequestUpdatePosition); connect(this, &MultiScreenWorker::requestNotifyWindowManager, this, &MultiScreenWorker::onRequestNotifyWindowManager); - connect(this, &MultiScreenWorker::requestUpdateDragArea, this, &MultiScreenWorker::onRequestUpdateDragArea); connect(this, &MultiScreenWorker::requestUpdateMonitorInfo, this, &MultiScreenWorker::onRequestUpdateMonitorInfo); connect(m_monitorUpdateTimer, &QTimer::timeout, this, [ = ] { diff --git a/frame/util/multiscreenworker.h b/frame/util/multiscreenworker.h index a12c9756b..56565dce4 100644 --- a/frame/util/multiscreenworker.h +++ b/frame/util/multiscreenworker.h @@ -178,12 +178,12 @@ signals: // 更新监视区域 void requestUpdateRegionMonitor(); - void requestUpdateFrontendGeometry(); //!!! 给后端的区域不能为是或宽度为0的区域,否则会带来HideState死循环切换的bug + void requestUpdateFrontendGeometry(); //!!! 给后端的区域不能为是或宽度为0的区域,否则会带来HideState死循环切换的bug void requestNotifyWindowManager(); void requestUpdatePosition(const Position &fromPos, const Position &toPos); void requestUpdateLayout(const QString &screenName); // 界面需要根据任务栏更新布局的方向 void requestUpdateDragArea(); // 更新拖拽区域 - void requestUpdateMonitorInfo(); // 屏幕信息发生变化,需要更新任务栏大小,拖拽区域,所在屏幕,监控区域,通知窗管,通知后端, + void requestUpdateMonitorInfo(); // 屏幕信息发生变化,需要更新任务栏大小,拖拽区域,所在屏幕,监控区域,通知窗管,通知后端, public slots: void onAutoHideChanged(bool autoHide); @@ -229,7 +229,6 @@ private slots: void onRequestNotifyWindowManager(); void onRequestUpdatePosition(const Position &fromPos, const Position &toPos); - void onRequestUpdateDragArea(); void onRequestUpdateMonitorInfo(); void updateMonitorDockedInfo(); diff --git a/frame/window/mainwindow.cpp b/frame/window/mainwindow.cpp index 307a33659..6f200d807 100755 --- a/frame/window/mainwindow.cpp +++ b/frame/window/mainwindow.cpp @@ -106,8 +106,6 @@ MainWindow::MainWindow(QWidget *parent) initComponents(); initConnections(); - //TODO 优先更新一下任务栏所在屏幕 - qDebug() << m_multiScreenWorker->deskScreen(); resetDragWindow(); m_mainPanel->setDelegate(this); @@ -312,7 +310,8 @@ void MainWindow::adjustShadowMask() QPainterPath clipPath; clipPath.addRect(QRect(QPoint(0, 0), this->geometry().size())); - m_platformWindowHandle.setClipPath(clipPath); + + m_platformWindowHandle.setClipPath(newRadius != 0 ? QPainterPath() : clipPath); } void MainWindow::onDbusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner) @@ -361,8 +360,12 @@ void MainWindow::resetDragWindow() break; } - if (m_dockSize == 0) - m_dockSize = m_multiScreenWorker->dockRect(m_multiScreenWorker->deskScreen()).height(); + if (m_multiScreenWorker->position() == Position::Left + || m_multiScreenWorker->position() == Position::Right) { + m_dockSize = this->width(); + } else { + m_dockSize = this->height(); + } // 通知窗管和后端更新数据 m_multiScreenWorker->updateDaemonDockSize(m_dockSize); // 1.先更新任务栏高度