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 696260 - As soon as nautilus is launched, inputing first char with hangul input source is always english.
As soon as nautilus is launched, inputing first char with hangul input source...
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Search Interface
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-21 09:58 UTC by sangu
Modified: 2016-05-31 02:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
query-editor: Make IMs process the fake event we generate at first (1.00 KB, patch)
2013-03-23 00:33 UTC, Rui Matos
reviewed Details | Review
query-editor: Fix initial key press processing with async IMs (3.17 KB, patch)
2013-03-23 00:33 UTC, Rui Matos
committed Details | Review
query-editor: Make IMs process the fake event we generate at first (1.75 KB, patch)
2013-03-23 23:36 UTC, Rui Matos
committed Details | Review

Description sangu 2013-03-21 09:58:34 UTC
As soon as nautilus is launched, inputing first char with hangul input source is always english in Search Entry.

en
1. launch nautilus
2. switch to hangul (한)
3. Click "r""k"
rㅏ

On the other hand, 
en
1. launch nautilus
2. click "r""k"
rk
3. switch to hangul (한)
3. click "r""k"
가

nautilus-3.7.92-1.fc19.x86_64

see also bug 695334
Comment 1 Rui Matos 2013-03-23 00:33:28 UTC
Created attachment 239594 [details] [review]
query-editor: Make IMs process the fake event we generate at first

Input methods will typically only process events after getting focus.
Comment 2 Rui Matos 2013-03-23 00:33:46 UTC
Created attachment 239595 [details] [review]
query-editor: Fix initial key press processing with async IMs

When using an async input method we can't rely on the entry's text or
preedit text being updated as a direct result of processing a key
event.

Instead, we can look at the event keyval and check if it's going to
yield a printable character to decide if we are interested in the
event.
Comment 3 Cosimo Cecchi 2013-03-23 21:36:08 UTC
Review of attachment 239594 [details] [review]:

This makes sense, but I wonder if we shouldn't also restore the previous focus widget in case the event wasn't handled.
Comment 4 Cosimo Cecchi 2013-03-23 21:36:28 UTC
Review of attachment 239595 [details] [review]:

Thanks, looks good.
Comment 5 Rui Matos 2013-03-23 23:36:10 UTC
Created attachment 239652 [details] [review]
query-editor: Make IMs process the fake event we generate at first

--

(In reply to comment #3)
> This makes sense, but I wonder if we shouldn't also restore the previous focus
> widget in case the event wasn't handled.

Agree, here's a new patch.
Comment 6 Cosimo Cecchi 2013-03-23 23:39:50 UTC
Review of attachment 239652 [details] [review]:

Looks good, thanks!
Comment 7 Cosimo Cecchi 2013-03-25 17:41:46 UTC
Attachment 239595 [details] pushed as 8a2d1c9 - query-editor: Fix initial key press processing with async IMs
Attachment 239652 [details] pushed as 378c01d - query-editor: Make IMs process the fake event we generate at first
Comment 8 sangu 2013-04-17 02:03:43 UTC
hangul input is broken preedit in nautilus 3.8.1
1. launch nautilus
2. switch input source to hangul
3. input rk 
Actual results:
ㄱㅏ

Expected results:
가

new bug?
Comment 9 Rui Matos 2013-04-17 14:42:40 UTC
(In reply to comment #8)
> hangul input is broken preedit in nautilus 3.8.1
> 1. launch nautilus
> 2. switch input source to hangul
> 3. input rk 
> Actual results:
> ㄱㅏ
> 
> Expected results:
> 가
> 
> new bug?

Attached a fix for this in bug 698205.
Comment 10 sangu 2016-05-31 02:47:42 UTC
comment #0 reopened in nautilus 2.20.x.