Commit e2aaff63 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Port InputPanelV1Client to WaylandClient's geometry helpers

parent fde34f3c
......@@ -74,7 +74,7 @@ void KWin::InputPanelV1Client::reposition()
const auto outputGeometry = m_output->geometry();
QRect geo(outputGeometry.topLeft(), panelSize);
geo.translate((outputGeometry.width() - panelSize.width())/2, outputGeometry.height() - panelSize.height());
setFrameGeometry(geo);
updateGeometry(geo);
}
} break;
case Overlay: {
......@@ -82,29 +82,12 @@ void KWin::InputPanelV1Client::reposition()
auto textInput = waylandServer()->seat()->focusedTextInput();
if (textClient && textInput) {
const auto cursorRectangle = textInput->cursorRectangle();
setFrameGeometry({textClient->pos() + textClient->clientPos() + cursorRectangle.bottomLeft(), surface()->size()});
updateGeometry({textClient->pos() + textClient->clientPos() + cursorRectangle.bottomLeft(), surface()->size()});
}
} break;
}
}
void InputPanelV1Client::setFrameGeometry(const QRect &geometry, ForceGeometry_t force)
{
Q_UNUSED(force);
if (m_frameGeometry != geometry) {
const QRect oldFrameGeometry = m_frameGeometry;
m_frameGeometry = geometry;
m_clientGeometry = geometry;
emit frameGeometryChanged(this, oldFrameGeometry);
emit clientGeometryChanged(this, oldFrameGeometry);
emit bufferGeometryChanged(this, oldFrameGeometry);
emit geometryShapeChanged(this, oldFrameGeometry);
addRepaintDuringGeometryUpdates();
}
}
void InputPanelV1Client::destroyClient()
{
markAsZombie();
......
......@@ -29,10 +29,7 @@ public:
};
Q_ENUM(Mode)
void setFrameGeometry(const QRect &geometry, KWin::AbstractClient::ForceGeometry_t force = NormalGeometrySet) override;
void destroyClient() override;
QRect bufferGeometry() const override { return frameGeometry(); }
bool isPlaceable() const override { return false; }
bool isCloseable() const override { return false; }
bool isResizable() const override { return false; }
......
Markdown is supported
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