Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
rime: declare tunnel variables as undefined (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksqsf authored Nov 3, 2024
1 parent 5c98106 commit ea8eda9
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions patches/rime.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa85bb6..cad8fea 100644
index 1a1637a..41e63d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,8 @@ find_package(Pthread REQUIRED)
Expand All @@ -12,21 +12,19 @@ index aa85bb6..cad8fea 100644
endif()

if ("${Rime_VERSION}" VERSION_LESS "1.10.0")
diff --git a/src/rimestate.cpp b/src/rimestate.cpp
index f986e50..76a5acd 100644
--- a/src/rimestate.cpp
+++ b/src/rimestate.cpp
@@ -80,7 +80,12 @@ void RimeState::clear() {
}
}

-void RimeState::activate() { maybeSyncProgramNameToSession(); }
+void RimeState::activate() {
+ maybeSyncProgramNameToSession();
+ if (session_) {
+ engine_->api()->set_option(session_->id(), "_linear", true);
+ }
+}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0854a9a..915977f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,6 +23,11 @@ else()
endif()

std::string RimeState::subMode() {
std::string result;
add_library(rime MODULE ${RIME_SOURCES})
+target_link_options(rime PUBLIC
+ LINKER:-U,_f5m_is_linear_layout
+ LINKER:-U,_f5m_is_vertical_rl
+ LINKER:-U,_f5m_is_vertical_lr
+)
target_link_libraries(rime ${RIME_LINK_LIBRARIES})
install(TARGETS rime DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5")
fcitx5_translate_desktop_file(rime.conf.in rime.conf)

0 comments on commit ea8eda9

Please sign in to comment.