| 351 | } |
| 352 | |
| 353 | void 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 | |
| 375 | void InputMethod::contentTypeChanged() |
| 376 | { |
nothing calls this directly
no test coverage detected