[vim/vim] GTK4: input method cannot compose text (PR #20266)

4 views
Skip to first unread message

mattn

unread,
May 20, 2026, 11:06:50 AM (2 days ago) May 20
to vim/vim, Subscribed

GTK4 GUI cannot use an input method to compose text: the IM popup appears for a moment and immediately disappears.

The previous code attached the key event controller to gui.mainwin and called gtk_im_context_filter_keypress() manually inside key_press_event(). In GTK4 that does not work reliably with GtkEventControllerKey.

This change attaches the key controller to gui.drawarea and binds the IM context to the controller via gtk_event_controller_key_set_im_context(). GTK4 then routes key events through the IM automatically (preedit/commit signals fire, and key-pressed is suppressed when the IM consumes the key), so the manual gtk_im_context_filter_keypress() call is no longer needed.

Fixes #20257


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20266

Commit Summary

  • ac5d399 GTK4: input method cannot compose text

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266@github.com>

mattn

unread,
May 21, 2026, 3:24:43 AM (yesterday) May 21
to vim/vim, Push

@mattn pushed 1 commit.

  • 60ad7a5 GTK4: preedit toplevel breaks Wayland input method


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/before/ac5d3998125002dc8409bae643ac2533976d1b1e/after/60ad7a590d9b81b91b495deb04a42e68ca294045@github.com>

mattn

unread,
May 21, 2026, 3:43:28 AM (yesterday) May 21
to vim/vim, Push

@mattn pushed 1 commit.

  • 2558787 GTK4: fold xim_init() into gui_mch_init()


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/before/60ad7a590d9b81b91b495deb04a42e68ca294045/after/2558787bfaf6f0e66e85332b5c1ff65c734a2f73@github.com>

mattn

unread,
May 21, 2026, 4:14:10 AM (yesterday) May 21
to vim/vim, Push

@mattn pushed 1 commit.

  • 2f6a48a GTK4: wire 'imstyle' to the Wayland PREEDIT_SHOWN content hint


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/before/2558787bfaf6f0e66e85332b5c1ff65c734a2f73/after/2f6a48af754fd3f4e79c17e7931b7d13c6d0b3d4@github.com>

mattn

unread,
May 21, 2026, 6:05:25 AM (yesterday) May 21
to vim/vim, Push

@mattn pushed 1 commit.

  • 944fc1d GTK4: re-implement IM_OVER_THE_SPOT preedit with GtkPopover


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/before/2f6a48af754fd3f4e79c17e7931b7d13c6d0b3d4/after/944fc1df465a3eab77becbf4da6469ed301326c5@github.com>

mattn

unread,
May 21, 2026, 6:33:50 AM (yesterday) May 21
to vim/vim, Push

@mattn pushed 1 commit.

  • f047813 GTK4: fix SEGV on startup from xim_init() cursor-location seed


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/before/e1f4f064452ce58c5a974979225a06ddf294482c/after/f047813263cc2276c0161fa5f438ce9b08e901a0@github.com>

Christian Brabandt

unread,
May 21, 2026, 5:01:57 PM (17 hours ago) May 21
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20266)

@lilydjwg does this fix your issue?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/c4512731464@github.com>

依云

unread,
May 21, 2026, 11:09:04 PM (10 hours ago) May 21
to vim/vim, Subscribed
lilydjwg left a comment (vim/vim#20266)

@chrisbra we are discussing at the original issue. (I'm not sure whether the discussion should move from issue to pr. I didn't for my recent issues.)


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/c4514650797@github.com>

mattn

unread,
3:59 AM (6 hours ago) 3:59 AM
to vim/vim, Push

@mattn pushed 1 commit.

  • 3873161 GTK4: align imstyle=1 preedit popover with cursor cell


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20266/before/f047813263cc2276c0161fa5f438ce9b08e901a0/after/38731614f59aac6f140a531f744a1394d7d96d86@github.com>

Reply all
Reply to author
Forward
0 new messages