D17544: virtualkeyboard: report the size of the inputwindow
Martin Flöser <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
graesslin requested changes to this revision.
graesslin added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> virtualkeyboard.cpp:116
>
> + m_trackedClient = Workspace::self()->activeClient();
> + connect(Workspace::self(), &Workspace::clientActivated, this,
The active window is not necessarily the window getting input events.
> virtualkeyboard.cpp:119
> + [this] {
> + disconnect(m_trackedClient, 0, this, 0);
> + m_trackedClient = Workspace::self()->activeClient();
nullptr!
> virtualkeyboard.cpp:244
> + if (m_inputWindow->isVisible() && Workspace::self()->activeClient() && m_inputWindow->rootObject()) {
> + const QRect activeWindowGeom = Workspace::self()->activeClient()->geometry();
> + const QRect inputPanelGeom = m_inputWindow->rootObject()->childrenRect().toRect().translated(m_inputWindow->geometry().topLeft());
Sorry, this doesn't work. We need surface local coordinates which exclude window decoration. Also as mentioned above the active client is not guaranteed to get keyboard events.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D17544
To: mart, #plasma, #kwin, bshah, graesslin
Cc: graesslin, davidedmundson, kwin, mart, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol