-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable IME on XWayland desktop environment #1427
Enable IME on XWayland desktop environment #1427
Conversation
indra/llwindow/llwindowsdl.cpp
Outdated
@@ -654,6 +654,11 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B | |||
SDL_SetHint( std::get<0>(hint), std::get<1>(hint)); | |||
} | |||
|
|||
#if LL_LINUX | |||
// Enable IME on XWayland | |||
setenv("XMODIFIERS", std::string("@im=fcitx;ibus").c_str(), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should usually be set in via your DE environment/startup and thus globally and there should be no need for any application to overwrite it.
If it absolutely cannot be set for just the viewer, the best place is the viewer startup shell script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, putting this into indra/newview/linux_tools/wrapper.sh
would be a better solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
I'll move there.
indra/llwindow/llwindowsdl.cpp
Outdated
@@ -654,6 +654,11 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B | |||
SDL_SetHint( std::get<0>(hint), std::get<1>(hint)); | |||
} | |||
|
|||
#if LL_LINUX | |||
// Enable IME on XWayland | |||
setenv("XMODIFIERS", std::string("@im=fcitx;ibus").c_str(), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, putting this into indra/newview/linux_tools/wrapper.sh
would be a better solution
The environment variable setting location has been moved. I checked again and found that ime was enabled when using fcitx, but not when using ibus. I don't know the cause. I can't change it any further at this point, so please review it and merge if it's okay. |
thanks for the contribution! |
This change fixes the IME to work even if the desktop environment is running on Wayland.