Skip to content

Backport: gtkimmulticontext: Handle switches between displays

Michael Catanzaro requested to merge cherry-pick-b67da389 into gtk-4-6

Currently the GtkIMMultiContext may stick to a delegate GtkIMContext that no longer applies after the multicontext is dissociated from any widget.

Handle set_client_widget() so that it can handle changes between widgets from 2 different display, but also so the delegate is made NULL whenever the context has a NULL widget.

Doing so, any new client widget results in a new delegate IM context lookup from the right GdkDisplay and GtkSettings, which avoids any mix up.

Fixes: #4805 (closed)

(cherry picked from commit b67da389)

Edited by Michael Catanzaro

Merge request reports