SetNextFrameWantCaptureKeyboard() not setting WantCaptureKeyboard #6997

Closed
opened 2023-11-09 07:11:49 +00:00 by microlith57 · 0 comments
microlith57 commented 2023-11-09 07:11:49 +00:00 (Migrated from github.com)

On the current latest docking commit; running example_sdl2_opengl3 on Linux Mint.

Dear ImGui 1.90 WIP (18998)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=201103
define: __linux__
define: __GNUC__=11
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_sdl2
io.BackendRendererName: imgui_impl_opengl3
io.ConfigFlags: 0x00000443
 NavEnableKeyboard
 NavEnableGamepad
 DockingEnable
 ViewportsEnable
io.ConfigViewportsNoDecoration
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00001C0E
 HasMouseCursors
 HasSetMousePos
 PlatformHasViewports
 HasMouseHoveredViewport
 RendererHasVtxOffset
 RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 1280.00,720.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00

My Issue/Question:

When hovering over (and clicking on) the pink rectangle in the WantCapture override demo, with the SetNextFrameWantCaptureKeyboard toggle set to false, WantCaptureKeyboard is not actually set to false (which is what I expected).
This is not the case for the mouse.

Screenshots/Video

wants_keyboard

Standalone, minimal, complete and verifiable example: If the demo does not suffice for this I can create one.

On the current [latest `docking` commit](https://github.com/ocornut/imgui/commit/37ea320b96a4b77581986f5581707021a7be94c9); running `example_sdl2_opengl3` on Linux Mint. ``` Dear ImGui 1.90 WIP (18998) -------------------------------- sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20 define: __cplusplus=201103 define: __linux__ define: __GNUC__=11 define: IMGUI_HAS_VIEWPORT define: IMGUI_HAS_DOCK -------------------------------- io.BackendPlatformName: imgui_impl_sdl2 io.BackendRendererName: imgui_impl_opengl3 io.ConfigFlags: 0x00000443 NavEnableKeyboard NavEnableGamepad DockingEnable ViewportsEnable io.ConfigViewportsNoDecoration io.ConfigInputTextCursorBlink io.ConfigWindowsResizeFromEdges io.ConfigMemoryCompactTimer = 60.0 io.BackendFlags: 0x00001C0E HasMouseCursors HasSetMousePos PlatformHasViewports HasMouseHoveredViewport RendererHasVtxOffset RendererHasViewports -------------------------------- io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64 io.DisplaySize: 1280.00,720.00 io.DisplayFramebufferScale: 1.00,1.00 -------------------------------- style.WindowPadding: 8.00,8.00 style.WindowBorderSize: 1.00 style.FramePadding: 4.00,3.00 style.FrameRounding: 0.00 style.FrameBorderSize: 0.00 style.ItemSpacing: 8.00,4.00 style.ItemInnerSpacing: 4.00,4.00 ``` **My Issue/Question:** When hovering over (and clicking on) the pink rectangle in the `WantCapture` override demo, with the `SetNextFrameWantCaptureKeyboard` toggle set to `false`, `WantCaptureKeyboard` is not actually set to `false` (which is what I expected). This is not the case for the mouse. **Screenshots/Video** ![wants_keyboard](https://github.com/ocornut/imgui/assets/7029204/8f60ddbc-2469-4412-970d-d83367faecff) **Standalone, minimal, complete and verifiable example:** If the demo does not suffice for this I can create one.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#6997
No description provided.