Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable IME when not needed #2589

Closed
wants to merge 2 commits into from
Closed

Conversation

actboy168
Copy link
Contributor

Now even if the focus is not on the input control, the IME will be activated, like this:

1

@ocornut ocornut added the inputs label May 29, 2019
@ocornut
Copy link
Owner

ocornut commented May 29, 2019

Thank you. I am tempted to keep a single function call and add a flag/bool to it. I'll use your PR as a template when looking into it.

@ocornut ocornut added the ime label Dec 14, 2020
@ocornut ocornut force-pushed the master branch 2 times, most recently from 0c1e5bd to bb6a60b Compare August 27, 2021 19:10
@ocornut ocornut force-pushed the master branch 2 times, most recently from 8b83e0a to d735066 Compare December 13, 2021 11:31
ocornut added a commit that referenced this pull request Jan 5, 2022
…emove backend-side IME implementation. Rrevert removal of MouseDragMaxDistanceAbs in 206b9ea. (#2589, #3113)

# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
#	imgui_widgets.cpp
@ocornut
Copy link
Owner

ocornut commented Jan 5, 2022

Hello @actboy168,
I've done some work today on standardizing IME api (previously it was different in master vs docking)
And included your change as part of the work.

The commits are
3a90dc3
2706c9d
1cbfe93 call ImmSetCandidateWindow() to position candidate window.
29a8ee0 your feature (rewritten with new system, but I kept your name attribution)
de36ff0

Thank you for your patience!

@ocornut
Copy link
Owner

ocornut commented Aug 3, 2022

FYI this change is causing an issue for many users, see #5535 for investigation.

@ocornut
Copy link
Owner

ocornut commented Aug 8, 2022

Pushed fix 133bbaf

ocornut added a commit that referenced this pull request Aug 8, 2022
@ocornut
Copy link
Owner

ocornut commented Aug 8, 2022

While we are working on a fix I have disabled this.

I also realize this feature may not be desirable for everyone as-is.

We are overriding a setting applying to the HWND based on dear imgui state.
Some people may want IME to work in their underlying/background app and this removes it completely for them.

I think once we fix the crash this should be reworked possibly as a tri-state stuff:

  • if imgui is focused and inputtext focused : enable ime
  • if imgui is focused and inputtext not focused : disable ime
  • if imgui not focused : restore and let app works things out.

I am afraid this may be difficult to implement.

ocornut added a commit that referenced this pull request Jan 15, 2024
…87, favor of writing to 'void* ImGuiViewport::PlatformHandleRaw'.

Amend 3a90dc3 (#2589, #2598, #3108, #3113, #3653, #4642)
@actboy168 actboy168 deleted the patch-3 branch January 23, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants