Commit dffc5a86 authored by David Redondo's avatar David Redondo 🏎
Browse files

osd: Correctly position on X with QT_SCREEN_SCALE_FACTORS set

Qt works in logical coordinates, while kscreen always returns
the unscaled size. However the positions of the outputs are not
changed so we can use it to get the scaled QScreen.


(cherry picked from commit 58b71b4b)
parent 5ef191e0
Pipeline #235222 passed with stage
in 57 seconds
......@@ -65,7 +65,8 @@ void Osd::showActionSelector()
layerWindow->setDesiredOutput(qGuiApp->screenAt(m_output->pos()));
} else {
auto newGeometry = m_osdActionSelector->geometry();
newGeometry.moveCenter(m_output->geometry().center());
auto screen = qGuiApp->screenAt(m_output->pos());
newGeometry.moveCenter(screen ? screen->geometry().center() : qGuiApp->primaryScreen()->geometry().center());
m_osdActionSelector->setGeometry(newGeometry);
KWindowSystem::setState(m_osdActionSelector->winId(), NET::SkipPager | NET::SkipSwitcher | NET::SkipTaskbar);
m_osdActionSelector->requestActivate();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment