Skip to content
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

Merged

Conversation

AiraYumi
Copy link
Contributor

@AiraYumi AiraYumi commented May 8, 2024

This change fixes the IME to work even if the desktop environment is running on Wayland.

@@ -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);
Copy link
Contributor

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.

Copy link
Collaborator

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

Copy link
Contributor Author

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.

@@ -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);
Copy link
Collaborator

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

@AiraYumi
Copy link
Contributor Author

AiraYumi commented May 9, 2024

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.

@brad-linden
Copy link
Collaborator

thanks for the contribution!

@brad-linden brad-linden merged commit 531cd34 into secondlife:release/maint-b May 9, 2024
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
@AiraYumi AiraYumi deleted the enable_ime_on_xwayland branch May 9, 2024 21:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants