D18818: virtualkeyboard: resize the focused window to make room for the keyboard
David Edmundson <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
davidedmundson added a comment.
Cool. Seems to work nicely, even with any weird edge cases I've thrown at it.
In general ++
You know someone is going to say "blah blah unit test blah".
It should be easy enough if we ignore the whole virtual keyboard part and instead invoke AbstractClient::setVirtualKeyboardRect directly. I can help if needed.
Also a few more comments would be nice (i.e why there is a floodTimer)
INLINE COMMENTS
> abstract_client.cpp:79
> + });
> + connect(this, qOverload<AbstractClient *, bool, bool>(&AbstractClient::clientMaximizedStateChanged), this, [this] () {
> + m_keyboardGeometryRestore = QRect();
+ clientFullscreen changed?
> abstract_client.h:731
> + QRect virtualKeyboardGeometry() const;
> + void setVirtualKeyboardGeometry(const QRect &geo);
> +
Please add a comment to say geo is relative to the global space, not the client
> virtualkeyboard.cpp:157
> + // Reset the old client virtual keybaord geom if necessary
> + if (m_trackedClient) {
> + m_trackedClient->setVirtualKeyboardGeometry(QRect());
If we move from one subsurface to another we would get into this path with the same client.
It might be worth doing
auto newClient = waylandServer()->findAbstractClient(waylandServer()->seat()->focusedTextInputSurface());
if (newClient != m_trackedClient) {
m_trackedClient->setVirtualKeyboardGeometry(QRect());
m_trackedClient = newClient;
}
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D18818
To: mart, #plasma, #kwin, bshah, graesslin, romangg
Cc: nicolasfella, mart, kwin, davidedmundson, graesslin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol