MCPcopy Create free account
hub / github.com/KDE/kwin / updateInputPanelState

Method updateInputPanelState

src/inputmethod.cpp:798–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796}
797
798void InputMethod::updateInputPanelState()
799{
800 if (m_panel && shouldShowOnActive()) {
801 m_panel->allow();
802 }
803
804 RectF overlap = RectF(0, 0, 0, 0);
805 if (m_trackedWindow) {
806 const bool bottomKeyboard = m_panel && m_panel->mode() != InputPanelV1Window::Mode::Overlay && m_panel->isShown();
807 m_trackedWindow->setVirtualKeyboardGeometry(bottomKeyboard ? m_panel->frameGeometry() : RectF());
808
809 if (m_panel && m_panel->mode() != InputPanelV1Window::Mode::Overlay) {
810 overlap = m_trackedWindow->frameGeometry() & m_panel->frameGeometry();
811 overlap.moveTo(m_trackedWindow->mapToLocal(overlap.topLeft()));
812 }
813 }
814
815 auto t = waylandServer()->seat()->textInputV2();
816 if (!t) {
817 return;
818 }
819 t->setInputPanelState(m_panel && m_panel->isShown(), overlap.toRect());
820}
821
822void InputMethod::setInputMethodCommand(const QString &command)
823{

Callers

nothing calls this directly

Calls 14

waylandServerFunction · 0.85
allowMethod · 0.80
frameGeometryMethod · 0.80
mapToLocalMethod · 0.80
textInputV2Method · 0.80
setInputPanelStateMethod · 0.80
toRectMethod · 0.80
RectFClass · 0.50
modeMethod · 0.45
isShownMethod · 0.45
moveToMethod · 0.45

Tested by

no test coverage detected