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 696141 - keyboard: Use the gtk+ ibus module if there's at least one ibus source
keyboard: Use the gtk+ ibus module if there's at least one ibus source
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-19 14:38 UTC by Rui Matos
Modified: 2013-03-19 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Use the gtk+ ibus module if there's at least one ibus source (4.70 KB, patch)
2013-03-19 14:38 UTC, Rui Matos
reviewed Details | Review
keyboard: Use the gtk+ ibus module if there's at least one ibus source (4.65 KB, patch)
2013-03-19 15:07 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-03-19 14:38:49 UTC
This isn't a complete fix for
https://bugzilla.redhat.com/show_bug.cgi?id=896490 and
https://bugzilla.gnome.org/show_bug.cgi?id=695334 but it definitely
helps to shorten the race window.
Comment 1 Rui Matos 2013-03-19 14:38:52 UTC
Created attachment 239254 [details] [review]
keyboard: Use the gtk+ ibus module if there's at least one ibus source

Switching the gtk+ IM module when switching input source adds delays
and races with the input events themselves. Thus it's better to always
use the ibus module as long as the user has at least one ibus input
source.
Comment 2 Bastien Nocera 2013-03-19 14:52:41 UTC
Review of attachment 239254 [details] [review]:

::: plugins/keyboard/gsd-keyboard-manager.c
@@ +346,3 @@
+        gchar *current_module;
+
+        if (need_ibus (sources))

short-circuit here to handle sources == NULL.

Or better, split the code below into a "get_im_module"/"set_im_module" pair.
Comment 3 Rui Matos 2013-03-19 15:07:43 UTC
Created attachment 239265 [details] [review]
keyboard: Use the gtk+ ibus module if there's at least one ibus source

--

(In reply to comment #2)
> +        if (need_ibus (sources))
>
> short-circuit here to handle sources == NULL.

Ok.

> Or better, split the code below into a "get_im_module"/"set_im_module" pair.

I'd rather keep apply_input_sources_settings() as simple as possible
and have the conditionals encapsulated here.
Comment 4 Rui Matos 2013-03-19 15:19:47 UTC
Attachment 239265 [details] pushed as 39b26a6 - keyboard: Use the gtk+ ibus module if there's at least one ibus source