mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: fix launcher show at a worng postion when using multi screen
dock only set postion calculated by current screen without curren screen x,y offset from top-left. log: fix launcher appears in the wrong place
This commit is contained in:
parent
2cb2a682c6
commit
c7a02a8719
@ -669,9 +669,9 @@ void WindowManager::onRequestUpdateFrontendGeometry()
|
|||||||
QScreen *screen = DIS_INS->screen(DOCKSCREEN_INS->current());
|
QScreen *screen = DIS_INS->screen(DOCKSCREEN_INS->current());
|
||||||
if (screen) {
|
if (screen) {
|
||||||
if (m_position == Dock::Position::Top || m_position == Dock::Position::Bottom)
|
if (m_position == Dock::Position::Top || m_position == Dock::Position::Bottom)
|
||||||
x = qMax(0, (int)((screen->handle()->geometry().width() - (rect.width() * qApp->devicePixelRatio())) / 2));
|
x = screen->handle()->geometry().x() + qMax(0, (int)((screen->handle()->geometry().width() - (rect.width() * qApp->devicePixelRatio())) / 2));
|
||||||
else
|
else
|
||||||
y = qMax(0, (int)((screen->handle()->geometry().height() - (rect.height() * qApp->devicePixelRatio())) / 2));
|
y = screen->handle()->geometry().y() + qMax(0, (int)((screen->handle()->geometry().height() - (rect.height() * qApp->devicePixelRatio())) / 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user