After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 118651 - gtkimmulticontext doesn't set_use_preedit on subsequent slaves
gtkimmulticontext doesn't set_use_preedit on subsequent slaves
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-07-30 11:01 UTC by Botond Botyanszki
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix for "gtkimmulticontext doesn't set_use_preedit on subsequent slaves" (937 bytes, patch)
2003-07-30 11:02 UTC, Botond Botyanszki
none Details | Review
Patch preserving bin compat and covering a few more things (5.99 KB, patch)
2003-08-19 19:22 UTC, Owen Taylor
none Details | Review

Description Botond Botyanszki 2003-07-30 11:01:03 UTC
On Tue, 2003-07-29 at 09:36, Botond Botyanszki wrote:
> Hello,
> 
> The GtkIMContext interface provides an API gtk_im_context_set_use_preedit
> that the application can call to notify the input method whether it
> supports preedit or not.
> I think it is usually called by the application after GtkIMMultiContext is
> instantiated. I have only seen gnome-terminal actually using this API. 
> 
> The problem is that if the input method is changed (by switching to a
> different one in the MultiContext menu), the newly loaded module cannot
> know about the preedit support, because the set_use_preedit function isn't
> called again.
> 
> e.g. if I start gnome-terminal with 
> `GTK_IM_MODULE="my-module" gnome-terminal`
> then my-module gets the use_preedit value, but if I start gnome-terminal
> without any im modules preloaded and then switch to my-module from the
> menu, it won't get the set_use_preedit flag. 
> 
> Is this a faulty design in GtkIMContext, or should the application
> (gnome-terminal/libvte) do something else in addition ?

A bug in GtkIMMulticontext  - it should remember the flag and pass it
to the new "slave" input method.

Please file a bug in bugzilla about it. I wouldn't object to a patch
along with it either.

Regards,
						Owen
Comment 1 Botond Botyanszki 2003-07-30 11:02:40 UTC
Created attachment 18751 [details] [review]
fix for "gtkimmulticontext doesn't set_use_preedit on subsequent slaves"
Comment 2 Owen Taylor 2003-08-19 19:22:41 UTC
Created attachment 19357 [details] [review]
Patch preserving bin compat and covering a few more things
Comment 3 Owen Taylor 2003-08-19 19:24:59 UTC
Tue Aug 19 14:37:46 2003  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkimmulticontext.[ch] (struct _GtkIMMulticontext):
        Replace client_window field with 'priv' pointer,
        retaining binary compatibility.
 
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_set_slave):
        save use_preedit/cursor_location/focus status and set
        up the new slave appropriately. (#118651, Botond Botyanszki)