Skip to content

Commit

Permalink
Merge pull request #9 from ubports/wayland-fixes
Browse files Browse the repository at this point in the history
Wayland fixes
  • Loading branch information
jpetersen authored Aug 14, 2020
2 parents b7249d5 + 2883c54 commit f497cc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/plugin/inputmethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ void InputMethod::onVisibleRectChanged()

QRect visibleRect = d->m_geometry->visibleRect().toRect();

if (d->m_settings.disableHeight() && QGuiApplication::platformName() == QLatin1String("ubuntumirclient")) {
if (d->m_settings.disableHeight() &&
(QGuiApplication::platformName() == "ubuntumirclient" || QGuiApplication::platformName() == "wayland")) {
visibleRect.setHeight(0);
}

Expand Down
10 changes: 5 additions & 5 deletions src/plugin/inputmethod_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ class InputMethodPrivate

if (QGuiApplication::platformName() == QLatin1String("ubuntumirclient")) {
view->setFlags(InputMethodWindowType); /* Mir-only OSK window type */

// When keyboard geometry changes, update the window's input mask
QObject::connect(m_geometry, &KeyboardGeometry::visibleRectChanged, view, [this]() {
view->setMask(m_geometry->visibleRect().toRect());
});
}

// When keyboard geometry changes, update the window's input mask
QObject::connect(m_geometry, &KeyboardGeometry::visibleRectChanged, view, [this]() {
view->setMask(m_geometry->visibleRect().toRect());
});
}

void setLayoutOrientation(Qt::ScreenOrientation screenOrientation)
Expand Down

0 comments on commit f497cc1

Please sign in to comment.