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

Method surroundingTextChanged

src/inputmethod.cpp:353–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353void InputMethod::surroundingTextChanged()
354{
355 auto t2 = waylandServer()->seat()->textInputV2();
356 auto t3 = waylandServer()->seat()->textInputV3();
357 auto inputContext = waylandServer()->inputMethod()->context();
358 if (!inputContext) {
359 return;
360 }
361 if (t2 && t2->isEnabled()) {
362 inputContext->sendSurroundingText(t2->surroundingText(), t2->surroundingTextCursorPosition(), t2->surroundingTextSelectionAnchor());
363 return;
364 }
365 if (t3 && t3->isEnabled()) {
366 inputContext->sendSurroundingText(t3->surroundingText(), t3->surroundingTextCursorPosition(), t3->surroundingTextSelectionAnchor());
367 return;
368 }
369 if (m_internalContext->isEnabled()) {
370 inputContext->sendSurroundingText(m_internalContext->surroundingText(), m_internalContext->cursorPosition(), m_internalContext->anchorPosition());
371 return;
372 }
373}
374
375void InputMethod::contentTypeChanged()
376{

Callers

nothing calls this directly

Calls 13

waylandServerFunction · 0.85
textInputV2Method · 0.80
textInputV3Method · 0.80
inputMethodMethod · 0.80
sendSurroundingTextMethod · 0.80
cursorPositionMethod · 0.80
anchorPositionMethod · 0.80
seatMethod · 0.45
contextMethod · 0.45
isEnabledMethod · 0.45
surroundingTextMethod · 0.45

Tested by

no test coverage detected