commit 215fb518e96e09ad29009b069d215abfce82bae3
Author: Koji Yokota <[email protected]>
Date: Tue Feb 10 15:55:38 2026 +0900
Make a signal connection to GuiInputMethod cascade from GuiWorkArea
---
src/frontends/qt/GuiApplication.cpp | 2 +-
src/frontends/qt/GuiApplication.h | 4 ++--
src/frontends/qt/GuiInputMethod.cpp | 2 --
src/frontends/qt/GuiWorkArea.cpp | 4 ++++
src/frontends/qt/GuiWorkArea.h | 4 ++++
5 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/frontends/qt/GuiApplication.cpp
b/src/frontends/qt/GuiApplication.cpp
index 5dd468ef02..d658cec6cb 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -2470,7 +2470,7 @@ void GuiApplication::processKeySym(KeySymbol const &
keysym, KeyModifier state)
// The preedit mode should avoid intervening multi-stroke commands
command_phase_ = func.action() == LFUN_COMMAND_PREFIX;
- Q_EMIT acceptsInputMethod();
+ Q_EMIT keyCommandStateSet();
// already here we know if it any point in going further
// why not return already here if action == -1 and
diff --git a/src/frontends/qt/GuiApplication.h
b/src/frontends/qt/GuiApplication.h
index 475d3e4e25..2b8040eff9 100644
--- a/src/frontends/qt/GuiApplication.h
+++ b/src/frontends/qt/GuiApplication.h
@@ -238,8 +238,8 @@ public:
bool isInCommandMode() { return command_phase_; }
Q_SIGNALS:
- ///
- void acceptsInputMethod();
+ /// signals the state of key command phase is set
+ void keyCommandStateSet();
private Q_SLOTS:
///
void execBatchCommands();
diff --git a/src/frontends/qt/GuiInputMethod.cpp
b/src/frontends/qt/GuiInputMethod.cpp
index f8eef39f39..7850876c73 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -103,8 +103,6 @@ GuiInputMethod::GuiInputMethod(GuiWorkArea *parent)
LYXERR(Debug::DEBUG, "GuiInputMethod: Address of buffer_view_: " <<
&d->work_area_->bufferView());
- connect(guiApp, &GuiApplication::acceptsInputMethod,
- this, &GuiInputMethod::toggleInputMethodAcceptance);
connect(this, &GuiInputMethod::inputMethodStateChanged,
d->sys_im_, &QInputMethod::update);
connect(d->sys_im_, &QInputMethod::localeChanged,
diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index d033d0fe23..8f9c7afbd8 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -192,6 +192,10 @@ void GuiWorkArea::init()
this, &GuiWorkArea::flagPreedit);
connect(d->im_, &GuiInputMethod::queryProcessed,
this, &GuiWorkArea::receiveIMQueryResponse);
+ connect(guiApp, &GuiApplication::keyCommandStateSet,
+ this, &GuiWorkArea::onKeyCommandStateSet);
+ connect(this, &GuiWorkArea::keyCommandStateSet,
+ d->im_, &GuiInputMethod::toggleInputMethodAcceptance);
// This connection is closed at the same time as this is destroyed.
d->synthetic_mouse_event_.timeout.timeout.connect([this](){
diff --git a/src/frontends/qt/GuiWorkArea.h b/src/frontends/qt/GuiWorkArea.h
index 9ef0c57bba..1ac5b07643 100644
--- a/src/frontends/qt/GuiWorkArea.h
+++ b/src/frontends/qt/GuiWorkArea.h
@@ -103,6 +103,8 @@ public Q_SLOTS:
void stopBlinkingCaret();
///
void startBlinkingCaret();
+ ///
+ void onKeyCommandStateSet() { Q_EMIT keyCommandStateSet(); }
Q_SIGNALS:
///
@@ -115,6 +117,8 @@ Q_SIGNALS:
void compressKeySym(KeySymbol const & sym, KeyModifier mod, bool
isAutoRepeat);
///
void preeditChanged(QInputMethodEvent * ev);
+ ///
+ void keyCommandStateSet();
private Q_SLOTS:
/// Scroll the BufferView.
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs