Experimental IBus support for X11 backend built on top of the IME API#10
Draft
ashie wants to merge 2 commits into
Draft
Experimental IBus support for X11 backend built on top of the IME API#10ashie wants to merge 2 commits into
ashie wants to merge 2 commits into
Conversation
This adds a dynamically loaded X11 IME module ABI and an experimental glfw-ibus.so backend for feasibility testing only. The module owns D-Bus and worker-thread communication, while GLFW drains queued IME events on the main thread without modifying the event loop architecture. The prototype includes preedit and commit handling, cursor location updates for IBus SetCursorLocation, the first-candidate-window positioning workaround, GLFW_IME_DEBUG instrumentation, and documentation of the architecture and known timeout risks.
Keep XFilterEvent as the suppressor for the XIM path, but do not call it before the experimental IME module sees KeyPress events. When the module reports a key as handled, return before normal GLFW key and character processing. This gives the IME module path the same kind of duplicate-input suppression that XFilterEvent provides for the XIM path, while keeping the XIM behavior unchanged. This effectively extends the duplicate-input suppression addressed by PR glfw#1972 to the experimental IME module path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is an experiment built on top of the IME API introduced by PR #2130: Add IME support for each platform.
One motivation for this work is that the traditional X11 XIM protocol is relatively limited compared to modern IME frameworks and can make it difficult to provide functionality comparable to IME implementations available on other platforms.
While XIM remains useful as a baseline solution, as GLFW's IME support evolves, it may be desirable to investigate alternatives that can expose richer IME functionality on X11.
The goal of this experiment is therefore not to propose IBus support for GLFW itself, but to evaluate whether the abstractions introduced by PR glfw#2130 are flexible enough to support an alternative X11 IME backend without modifying the GLFW event loop.
The prototype uses:
and currently supports:
on X11.
This implementation should be viewed as a research prototype rather than an upstream proposal.
See docs/ime-ibus-prototype.md for architecture details, design rationale, limitations and future work.
Additional prerequisites
Build:
Run demo:
$ GLFW_IM_MODULE=$PWD/build/src/glfw-ibus.so ./build/tests/input_text