Page MenuHome

Fix Hotkeys malfunction after leaving text field with no input using IME(Chinese/Japanese/Korean) Ref T93421
Needs ReviewPublic

Authored by Takahiro Shizuki (sntulix) on Dec 12 2021, 9:17 AM.

Details

Summary

Ref T93421

This patch fixes about the bug affected by D11929.

In Blender v3.0 for Windows, Hot keys are not functional when a user click 3D viewport after inputting no text on text edit with IME enabled.

Reason:

  • If a user inputed no text on text edit and click 3D viewport, IME is not closed. (If a user inputed some text, IME is closed.)
  • By D11929, When IME is opened, a key event is forwarded to IME.

This bug is happen by aboves.

Approach:

  • modifying to become same to v2.92's behavior.
Note: The Behavior per blender version:

    click a text edit, switch to IME On (manually or automatically), inputting some letters, click 3D viewport:
            2.92: After above, IME Off automatically and hotkey is functional.
                After using hotkey, click a text edit and IME switch should be On.
            3.0 (Released): After above, IME Off automatically and hotkey is functional.
                After using hotkey, click a text edit and IME switch should be On.
        click a text edit, switch to IME On (manually or automatically), click 3D viewport:
            2.92: After above, IME is not changed and hotkey is functional (IME word conversion list will be popup, inputting is continue on IME).
                After using hotkey, click a text edit and IME switch should be not changed (IME On).
            3.0 (Released): After above, IME is not change and some hotkey is NOT functional (IME word conversion list will be popup, inputting is continue on IME).
                And, click a text edit and IME switch should be not changed (IME On).

The Behavior of a fixing:

    click a text edit, switch to IME On (manually or automatically), inputting some letters, click 3D viewport:
        After above, IME Off automatically and hotkey is functional.
            After using hotkey, click a text edit and IME switch should be On.

    click a text edit, switch to IME On (manually or automatically), click 3D viewport:
        After above, IME Off automatically and hotkey is functional.
            After using hotkey, click a text edit and IME switch should be On.

Diff Detail

Event Timeline

Takahiro Shizuki (sntulix) added inline comments.
source/blender/editors/interface/interface_handlers.c
3590

If a user inputed no text on text edit and click 3D viewport, IME is not closed. (If a user inputed some text, IME is closed.)

I have no knowledge of this area, but this patch seems to fix the issue. @Harley Acheson (harley) seems to be involved here so will assign him as reviewer

When following steps to reproduce for T93421, this triggers assert in wm_window_IME_end(), win->ime_data was NULL.