Skip to content

Commit

Permalink
fix: tips position error
Browse files Browse the repository at this point in the history
as title

log: as title
issue: linuxdeepin/developer-center#8197
  • Loading branch information
ssk-wh committed Apr 25, 2024
1 parent b6ee21f commit 4da47a9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion panels/dock/tray/frame/util/dockpopupwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,15 @@ void DockPopupWindow::show(const int x, const int y)
break;
}
blockButtonRelease();
QScreen *screen = DIS_INS->screen(DOCK_SCREEN->current());

// find the screen where dock onto
QScreen *screen = nullptr;
for (auto tw : qApp->topLevelWidgets()) {
if (QString(tw->metaObject()->className()) == "DockTrayWindow") {
screen = tw->screen();
break;
}
};
if (!screen)
return;
QRect screenRect = screen->geometry();
Expand Down

0 comments on commit 4da47a9

Please sign in to comment.