Closed Bug 345718 Opened 18 years ago Closed 3 years ago

Focus changing events won't be issued in gtk+2

Categories

(Core :: Internationalization, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED INACTIVE

People

(Reporter: ryo-dairiki, Assigned: smontagu)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; ja; rv:1.8.0.4) Gecko/20060614 Fedora/1.5.0.4-1.2.fc5 Firefox/1.5.0.4 pango-text
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; ja; rv:1.8.0.4) Gecko/20060614 Fedora/1.5.0.4-1.2.fc5 Firefox/1.5.0.4 pango-text

In gtk+2, focus_out () events should be issued everytime you change focus.
But currently, it often misses to send them so IM cannot destroy the preedit on changing the focus.

The most worst case is moving the focus from finding bar at the bottom of the browser into the google search bar at the top right of it.
In that case, the IMContext doesn't catch any event at all.
(no "reset" event, no "focus_in" event, and no "focus_out" event)

At that time, the surrunding string doesn't show up correctly.
This is because the text passed from IME through get_preedit_string () is not shown in the right place but added just after the previous preedit string!
Then the preedit string grows longer and longer everytime you type a key.

There is another case, (I think it's related problem)
Focus_in and focus_out events are properly issued when you move the focus from the text-entry in the contents of a web page into the finding bar.
However, when I emmit "preedit_changed" signal in the focus_out handler in an IMContext, nothing is happened.
The signal is completely ignored that I cannot hide the preedit!

I think focus releated implementations of gtkIMModule in Mozilla suits are slightly wrong.
We, IME programers requires these problems are solved in the near future.

Reproducible: Always

Steps to Reproduce:
Please use SCIM or UIM in firefox.

1. Change the focus with the preedit shown.
2. Type something, and see what happen.
3. Move it back on the previous widget.
4. Type something, and see what happen.

Actual Results:  
Always,
- The preedit remains showing.

Sometimes,
- The previous preedit string is shown on the first typing.
- The previous string and the new latter appends the previous one again, and the preedit string grow longer and longer everytime you type a key.

Expected Results:  
- The preedit can be changed or killed in focus_out handler of IMContextes.
- The string gotten from get_preedit_string () must replace whole the preedit string anytime.

It's okay when you move the focus into and out of the browser window. :)
Looks like this will be fixed in firefox 3.0.
I tested with the 3.0a7 linux build and could not reproduce.
QA Contact: amyy → i18n
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

closing as inactive. reopen if needed.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.