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

When the window loses focus io.KeysDown should be set to false #3961

Closed
TheClockIT opened this issue Mar 23, 2021 · 3 comments
Closed

When the window loses focus io.KeysDown should be set to false #3961

TheClockIT opened this issue Mar 23, 2021 · 3 comments

Comments

@TheClockIT
Copy link

Version: 1.83 WIP
Branch: 1.83 WIP_docking_

Back-ends: imgui_impl_win32.cpp
Operating System: Windows10 20H2

IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
...
    case WM_KILLFOCUS:
        memset(io.KeysDown, 0, sizeof(io.KeysDown));
        return 0;
...
}
@ocornut
Copy link
Owner

ocornut commented Mar 23, 2021

Same as #2062

@ocornut
Copy link
Owner

ocornut commented Mar 23, 2021

I'll move to #2062

@ocornut
Copy link
Owner

ocornut commented Mar 23, 2021

I pushed your suggested fix now : 1491d2c

As it happens, in docking + multi-viewports enabled it does make held key flick off for one frame, but this issue has also been present in the GLFW backend so my conclusion is that it's a much less problematic issue than the one we are fixing one. We can improve on the multi-viewports code later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants