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 694267 - The search entry no longer reacts to layout switches
The search entry no longer reacts to layout switches
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: x11
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-20 14:03 UTC by Yosef Or Boczko
Modified: 2013-06-22 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Video showing the bug (615.11 KB, video/webm)
2013-02-20 14:16 UTC, Yosef Or Boczko
  Details
x11/clutter-keymap-x11: Honor XkbNewKeyboardNotify events (986 bytes, patch)
2013-02-21 23:53 UTC, Rui Matos
committed Details | Review
x11: Get key events' unicode_value from clutter_keysym_to_unicode() (5.81 KB, patch)
2013-02-21 23:59 UTC, Rui Matos
reviewed Details | Review

Description Yosef Or Boczko 2013-02-20 14:03:27 UTC
Search review will always be in English, even if the language has changed.
Comment 1 Florian Müllner 2013-02-20 14:07:32 UTC
Can you please describe what you mean by "search review"?
Comment 2 Yosef Or Boczko 2013-02-20 14:09:52 UTC
Typing on "Type to search ..." in GNOME Shell
Comment 3 Yosef Or Boczko 2013-02-20 14:16:41 UTC
Created attachment 236931 [details]
Video showing the bug
Comment 4 Florian Müllner 2013-02-20 14:30:39 UTC
OK, I could reproduce the problem now - the problem is not that it always uses the English layout, but that it always sticks to the layout that was active when the shell was started.
Comment 5 Florian Müllner 2013-02-20 14:33:13 UTC
... and I could just reproduce with the run-dialog, so this looks like a general problem with StEntry.
Comment 6 Yosef Or Boczko 2013-02-21 00:32:53 UTC
This bug also exists in bringing Password !
Comment 7 Yosef Or Boczko 2013-02-21 23:38:00 UTC
You plan to fix this bug? To do with anything?
Comment 8 Rui Matos 2013-02-21 23:51:10 UTC
This is a clutter bug, patch coming.
Comment 9 Yosef Or Boczko 2013-02-21 23:52:33 UTC
Thank you :-)
Comment 10 Rui Matos 2013-02-21 23:53:11 UTC
Created attachment 237129 [details] [review]
x11/clutter-keymap-x11: Honor XkbNewKeyboardNotify events

We already select for XkbNewKeyboardNotify events but are not acting
on them. Start doing so.
--

This is the only patch needed to fix the bug here.
Comment 11 Rui Matos 2013-02-21 23:59:29 UTC
Created attachment 237130 [details] [review]
x11: Get key events' unicode_value from clutter_keysym_to_unicode()

This harmonizes both the core X11 and XI2 code paths and gets rid of
copy&pasted code from libX11.

--

This is basically a cleanup. It uses the same method that gtk+ uses to
determine printable characters from key events.

Note that the bug reported here didn't occur when using the core X11
backend because when libX11 has XKB support it will update its
internal state on XkbNewKeyboardNotify and thus XLookupString() was
still able to produce the correct characters.
Comment 12 Yosef Or Boczko 2013-02-22 00:19:36 UTC
I checked - the bug no longer exists.

Incidentally, the key combination to change language (Alt + Shift etc) does not work in the review.
Comment 13 Emmanuele Bassi (:ebassi) 2013-02-24 09:51:34 UTC
Review of attachment 237130 [details] [review]:

it would be great to see a conformance test suite to verify that the Unicode translation does not regress between current code and this commit, given that you're switching from using something coming from X11 (or X11 code, in the XI2 case) to something written for Clutter. I'm always wary about "fixing X11", given that people may be relying on crazy values coming from it. the main problem is that injecting X11 events is a pain in the arse...

::: clutter/x11/clutter-device-manager-core-x11.c
@@ +257,3 @@
+    event->key.unicode_value = (gunichar) '\0';
+
+  g_unichar_to_utf8 (ch, buffer);

not a blocking issue, but given that buffer and g_unichar_to_utf8() are only used in the debug path, it may be better to do:

#ifdef CLUTTER_ENABLE_DEBUG
  {
    char buffer[7] = { 0, };
    g_unichar_to_utf8 (ch, buffer);

    CLUTTER_NOTE (EVENT, ...)
  }
#endif

instead of calling g_unichar_to_utf8() unconditionally.
Comment 14 Emmanuele Bassi (:ebassi) 2013-02-24 09:51:57 UTC
Review of attachment 237129 [details] [review]:

looks obviously correct.
Comment 15 Rui Matos 2013-02-24 17:35:33 UTC
Comment on attachment 237129 [details] [review]
x11/clutter-keymap-x11: Honor XkbNewKeyboardNotify events

Attachment 237129 [details] pushed as 5c2931a - x11/clutter-keymap-x11: Honor XkbNewKeyboardNotify events