Skip to content

Commit

Permalink
Extend input method check for gcin (#3315)
Browse files Browse the repository at this point in the history
* add @changhc to author list

* check against unsupported im only

* Apply clang-format


Co-authored-by: Henry Heino <hheino@uw.edu>
  • Loading branch information
changhc and personalizedrefrigerator committed Sep 3, 2021
1 parent bd3ca75 commit e6bb8b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Henrik Dick <hen-di@web.de>
Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com>
Henry Heino <personalizedrefrigerator@gmail.com>
Holzfeind, Daniel Georg <git@holzfeind.net>
Huan-Cheng Chang <hello@changhc.me>
Jan Hrdina <jan.hrdka@gmail.com>
Jason Vander Woude <jasonvwoude@gmail.com>
John Doe <johndoe@0.0>
Expand Down
9 changes: 6 additions & 3 deletions src/control/XournalMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,12 @@ using XMPtr = XournalMainPrivate*;
/// Checks for input method compatibility and ensures it
void ensure_input_model_compatibility() {
const char* imModule = g_getenv("GTK_IM_MODULE");
if (imModule != nullptr && strcmp(imModule, "xim") == 0) {
g_setenv("GTK_IM_MODULE", "ibus", true);
g_warning("Unsupported input method: xim, changed to: ibus");
if (imModule != nullptr) {
std::string imModuleString{imModule};
if (imModuleString == "xim" || imModuleString == "gcin") {
g_setenv("GTK_IM_MODULE", "ibus", true);
g_warning("Unsupported input method: %s, changed to: ibus", imModule);
}
}
}

Expand Down

0 comments on commit e6bb8b7

Please sign in to comment.