[FIX] 【显示器】【双屏】双屏镜像模式下在桌面新建文件,拔掉一个显示器然后重启,再次连接,默认扩展,且扩展屏出现重叠图标 [LINK]131422

This commit is contained in:
杨 艳微 2022-08-26 10:37:43 +03:00 committed by Yue-Lan
parent 77a966d170
commit 9f077f421d
1 changed files with 7 additions and 2 deletions

View File

@ -314,8 +314,13 @@ Peony::DesktopItemModel *PeonyDesktopApplication::getModel()
Peony::DesktopIconView *PeonyDesktopApplication::getIconView(QPoint pos)
{
//获取当前屏幕的view
Peony::DesktopIconView *desktopIconView = m_bg_windows[0]->getIconView();
//获取当前屏幕的view,如果是镜像直接返回主屏
Peony::DesktopIconView *desktopIconView = getIconView(qApp->primaryScreen());
QRegion screenRegion(qApp->primaryScreen()->geometry());
if (screenRegion.contains(pos)) {
return desktopIconView;
};
for (auto window : m_bg_windows) {
QRegion screenRegion(window->screen()->geometry());
if (screenRegion.contains(pos)) {