Commit 30e53313 authored by Marco Martin's avatar Marco Martin Committed by Daniel Vrátil
Browse files

let kwin position the popup

kwin has own positioning code for osd windows, don't try
to position ourselves so it will fallback to kwin's code
parent 553a13cd
......@@ -86,25 +86,6 @@ void Osd::showOutputIdentifier(const KScreen::OutputPtr output)
showOsd();
}
void Osd::updatePosition()
{
if (!m_outputGeometry.isValid()) {
return;
}
auto *rootObject = m_osdObject->rootObject();
const int dialogWidth = rootObject->property("width").toInt();
const int dialogHeight = rootObject->property("height").toInt();
const int relx = m_outputGeometry.x();
const int rely = m_outputGeometry.y();
const int pos_x = relx + (m_outputGeometry.width() - dialogWidth) / 2;
const int pos_y = rely + (m_outputGeometry.height() - dialogHeight) / 2;
rootObject->setProperty("x", pos_x);
rootObject->setProperty("y", pos_y);
}
void Osd::showOsd()
{
m_osdTimer->stop();
......@@ -122,7 +103,6 @@ void Osd::showOsd()
} else {
rootObject->setProperty("visible", true);
}
updatePosition();
m_osdTimer->start(m_timeout);
}
......
......@@ -48,7 +48,6 @@ public:
private:
void hideOsd();
void showOsd();
void updatePosition();
KScreen::OutputPtr m_output;
QRect m_outputGeometry;
......
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