Skip to content

Commit d845c90

Browse files
committed
Increase the timeout on wayland self diagnose and start timer after main instance
Fix #1561
1 parent eec9bb2 commit d845c90

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/modules/wayland/waylandmodule.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,14 @@ WaylandModule::WaylandModule(fcitx::Instance *instance)
213213
EventType::InputMethodGroupChanged, EventWatcherPhase::Default,
214214
[this](Event &) { setLayoutToCompositor(); }));
215215

216-
deferredDiagnose_ = instance_->eventLoop().addTimeEvent(
217-
CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + 7000000, 0,
218-
[this](EventSourceTime *, uint64_t) {
219-
selfDiagnose();
220-
return true;
221-
});
216+
instance_->eventDispatcher().schedule([this]() {
217+
deferredDiagnose_ = instance_->eventLoop().addTimeEvent(
218+
CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + 10000000, 0,
219+
[this](EventSourceTime *, uint64_t) {
220+
selfDiagnose();
221+
return true;
222+
});
223+
});
222224
#endif
223225
}
224226

0 commit comments

Comments
 (0)