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 522885 - GTK applications can not destroy IMContext immediately.
GTK applications can not destroy IMContext immediately.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
2.12.x
Other All
: Normal normal
: ---
Assigned To: Hidetoshi Tajima
gtk-bugs
: 528502 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-17 05:56 UTC by Peng Huang
Modified: 2012-05-26 19:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Peng Huang 2008-03-17 05:56:20 UTC
Please describe the problem:
In the trunk, gtk added a new featrue - supporting  XSETTINGS for immodule. Please refer bug 502446. I found a problem with it, when users use XSETTINGS to change the immodule settings, all gtk applications will not destroy old IMContext immediately. The widget having im context must be focused in, and then the MultiContext will destroy the old im slave context. It's very weird, especially, if there are many input widgets on screen, users must click widgets one by one.


Steps to reproduce:
1. Open several gedit or gnome-terminals.
2.  Use im-chooser to enable Input Method, and select SCIM as Input Method.
3.  Focus to gedits.
4. Use im-chooser to disable Input Method.



Actual results:
SCIM will not be disable. You will see scim's tray icons.
If you click gedits one by one, the scim will exit.

Expected results:
All scim im contexts will be destoried immediately, and scim will exit.

Does this happen every time?
always.

Other information:
Comment 1 Matthias Clasen 2008-07-11 22:57:21 UTC
To fix this, we'll need to keep a list of all GtkIMMulticontext instances and 
in im_module_setting_changed, run over that list and call 
gtk_im_multicontext_set_slave (multicontext, NULL, FALSE).
Comment 2 Peng Huang 2008-07-11 23:07:07 UTC
Does it work that let GtkIMMulticontext listen to GtkSettings' signals and call gtk_im_multicontext_set_slave (multicontext, NULL, FALSE) by self?
Comment 3 Matthias Clasen 2008-07-11 23:49:39 UTC
That would work too, but there can be a lot of entries in an application, and the setting will only change infrequently. In those cases, we usually connect a single handler (like we already do in the current code) and have it iterate over all the objects that need to know about the change.
Comment 4 Matthias Clasen 2008-09-29 04:14:17 UTC
*** Bug 528502 has been marked as a duplicate of this bug. ***
Comment 5 Matthias Clasen 2009-01-13 07:14:28 UTC
Of course, there is nothing that forces scim to wait for the last client to exit before it goes away. 
Comment 6 Rui Matos 2012-05-03 11:54:35 UTC
Hmm, just found this now. IIUC, this should be fixed with the patch in bug 675365.
Comment 7 Matthias Clasen 2012-05-26 19:53:10 UTC
ok, lets assume so