summaryrefslogtreecommitdiff
path: root/src/managers/input/InputMethodRelay.cpp
diff options
context:
space:
mode:
authorq234rty <q23456yuiop@gmail.com>2023-09-01 22:39:15 +0800
committerGitHub <noreply@github.com>2023-09-01 16:39:15 +0200
commit5035f5fc682f3307e2130e10d5ba209495113edb (patch)
tree79a30f8dfa8cc7d6ec48d5db215e891f48eb5c38 /src/managers/input/InputMethodRelay.cpp
parent1a13d44d5dbe8e13480366dc97ea7eeee4ff42bb (diff)
text-input-v1: Fix preedit styling in chromium (#3131)
Diffstat (limited to 'src/managers/input/InputMethodRelay.cpp')
-rw-r--r--src/managers/input/InputMethodRelay.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp
index 99949fce..58ad2a2d 100644
--- a/src/managers/input/InputMethodRelay.cpp
+++ b/src/managers/input/InputMethodRelay.cpp
@@ -46,12 +46,12 @@ void CInputMethodRelay::onNewIME(wlr_input_method_v2* pIME) {
} else {
if (PIMR->m_pWLRIME->current.preedit.text) {
zwp_text_input_v1_send_preedit_cursor(PTI->pV1Input->resourceImpl, PIMR->m_pWLRIME->current.preedit.cursor_begin);
- zwp_text_input_v1_send_preedit_styling(PTI->pV1Input->resourceImpl, 0, std::string(PIMR->m_pWLRIME->current.preedit.text).length() - 1,
- ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_NONE);
+ zwp_text_input_v1_send_preedit_styling(PTI->pV1Input->resourceImpl, 0, std::string(PIMR->m_pWLRIME->current.preedit.text).length(),
+ ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT);
zwp_text_input_v1_send_preedit_string(PTI->pV1Input->resourceImpl, PTI->pV1Input->serial, PIMR->m_pWLRIME->current.preedit.text, "");
} else {
zwp_text_input_v1_send_preedit_cursor(PTI->pV1Input->resourceImpl, PIMR->m_pWLRIME->current.preedit.cursor_begin);
- zwp_text_input_v1_send_preedit_styling(PTI->pV1Input->resourceImpl, 0, 0, ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_NONE);
+ zwp_text_input_v1_send_preedit_styling(PTI->pV1Input->resourceImpl, 0, 0, ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT);
zwp_text_input_v1_send_preedit_string(PTI->pV1Input->resourceImpl, PTI->pV1Input->serial, "", "");
}