[LyX/master] Revert "Better identification of the focused IM segment"
Koji Yokota <[email protected]> Sun, 14 Jun 2026 05:04:06 +0000
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 5f8fc5a634d3478c2767c828ae2d0ecda1e19b00 Author: Koji Yokota <[email protected]> Date: Sun Jun 14 13:28:34 2026 +0900 Revert "Better identification of the focused IM segment" This reverts commit a2921b65c74caa5929f6169ba0369bec00281ba7. Since QInputMethodEvent::Cursor doesn't arrive on time on Linux, we adopt the old specification. --- src/frontends/qt/GuiInputMethod.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiInputMethod.cpp b/src/frontends/qt/GuiInputMethod.cpp index c9e02e4441..e6b026fd97 100644 --- a/src/frontends/qt/GuiInputMethod.cpp +++ b/src/frontends/qt/GuiInputMethod.cpp @@ -537,7 +537,11 @@ pos_type GuiInputMethod::setTextFormat(const QInputMethodEvent::Attribute & it, // NOTE: brush size is assumed to be four // if it is to be changed, change the declaration of array in // setPreeditStyle() - if (it.start == d->caret_rel_pos_) { + // Also, the "if" below doesn't work since QInputMethodEvent::Cursor + // doesn't arrive on time on Linux so d->caret_rel_pos_ can contain + // old information. + // if (it.start == d->caret_rel_pos_) { + if (char_format.background().color() != QColorConstants::Black) { fg = qcolorOverlay(brush[0].color(), im_fg); bg = qcolorOverlay(brush[1].color(), im_bg); } else { -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs