Turtle Dove
9b655aa4d5
Android: Address ImRAD review feedback on PR #9469
...
CRITICAL FIX: Restore NewFrame/Shutdown/GetDisplayMetrics lost in rebase
- File was truncated at line 605 during rebase onto upstream/master
- Restored all three functions with proper implementations
REVIEW FEEDBACK ADDRESSED:
1. Rotation: Re-query display metrics in NewFrame when window resizes
2. Keyboard opt-in: SetJniEnabled(false by default) - app retains control
- SetKeyboardType() / SetKeyboardAction() for customization
3. Keyboard timing: GetWantTextInput() / ResubmitTextInput() for app control
4. Back button: Hides soft keyboard when visible (consumes event)
5. Unicode input: Kept as optional JNI plumbing (app decides when to poll)
6. GetAssetData: Documented in PR_9469_REVIEW_RESPONSE.md (restore in main.cpp)
7. TERM_WINDOW: Documented (EGL surface lifecycle fix in main.cpp)
8. NavBar/insets: GetNavBarHeight() + GetBottomInset() (DisplayCutout API 28+)
Long press: SetLongPressCallback() + SetLongPressDuration()
Pressure: Full pressure sensitivity system
PRESSURE SENSITIVITY:
- Per-pointer pressure tracking (up to 10 pointers)
- GetTouchPressure(pointer_id) API
- SetPressureEnabled() / SetPressureThreshold()
- Long-press requires sustained min pressure (not just timer)
- Pressure-weighted scrolling (firmer press = faster scroll)
- Move events update pressure and cancel long-press if pressure drops
All APIs are opt-in. Default behavior preserves pre-PR #9469 app control.
2026-07-18 23:43:10 -05:00
Turtle Dove
372066e249
Android: Move JNI keyboard/clipboard into backend, add display metrics ( #3446 )
...
Backend improvements (imgui_impl_android.h/.cpp):
- Moved JNI soft-keyboard and Unicode char polling from the example into
the backend. The application no longer needs any JNI boilerplate.
- Added clipboard support via JNI to Android ClipboardManager. (#7259 )
- Added display metrics (DPI, density, refresh rate, orientation) via JNI.
Used by the example to set main_scale from actual device density instead
of hardcoded 2.0f.
- BREAKING CHANGE: ImGui_ImplAndroid_Init() now takes additional
asset_manager and native_activity parameters. See before/after in header.
Example (main.cpp):
- Removed ShowSoftKeyboardInput() and PollUnicodeChars() JNI helpers (~120 lines).
- Removed their forward declarations and per-frame calls.
- Updated Init() call to new signature.
- Use ImGui_ImplAndroid_GetDisplayMetrics() for main_scale.
- All other comments, EGL block, GetAssetData, APP_CMD cases unchanged.
MainActivity.kt: unchanged (same 3 JNI bridge methods, now called by backend).
docs/CHANGELOG.txt: Added entries for backend and example changes.
2026-07-18 21:05:30 -05:00
rbrtc
7038887c32
Docs: fixed link in FAQ index. ( #9480 )
2026-07-17 13:51:28 +02:00
Brenton Bostick
61a093635c
Backends: OpenGL3: fixed updating textures. ( #9478 , #9477 , #9473 , #8802 )
...
Fixed 0ff4a8a.
2026-07-17 13:49:02 +02:00
ocornut
26b8292635
Split ImGuiItemFlags_LiveEdit into ImGuiItemFlags_LiveEditText, ImGuiItemFlags_LiveEditScalar. Added Demo contents. ( #9476 , #701 )
...
cc #3936 , #3946 , #5904 , #6284 , #8149 , #8065 , #8665 , #9117 , #9299 , #700 , #1351 , #1875 , #2060 , #2215 , #2380 , #2550 , #3083 , #3338 , #3556 , #4373 , #4714 , #4885 , #5184,#5777, #6707 , #6766 , #8004 , #8303 , #8915 , #9308
2026-07-16 15:46:47 +02:00
ocornut
c958f16059
EndGroup: fixed reporting combined Edit when it happens at the same time as tabbing to next ActiveId. ( #9476 , #701 )
2026-07-16 15:46:43 +02:00
ocornut
4853f5c96b
Internals: rename NextItemData.ItemFlags -> ItemFlagsSet
2026-07-16 15:46:40 +02:00
ocornut
18d63b12be
Added ImGuiItemFlags_LiveEdit flag, and much-awaited support for disabling it. ( #9476 , #701 )
...
cc #3936 , #3946 , #5904 , #6284 , #8149 , #8065 , #8665 , #9117 , #9299 , #700 , #1351 , #1875 , #2060 , #2215 , #2380 , #2550 , #3083 , #3338 , #3556 , #4373 , #4714 , #4885 , #5184,#5777, #6707 , #6766 , #8004 , #8303 , #8915 , #9308
2026-07-16 15:39:53 +02:00
ocornut
2392a52660
InputText: tag InputTextDeactivatedState with an elapsing frame. Avoid unnecessary InputTextDeactivateHook() call on manual deactivation. InputTextDeactivateHook() only takes a record when Edited + callback marks edited. ( #9476 , #701 )
...
for _NoLiveEdit it's easier than we don't use IsItemDeactivatedAfterEdit() in InputText()'s `if (g.InputTextDeactivatedState.ID == id)` block.
2026-07-16 15:39:52 +02:00
ocornut
baeea39c1a
Settings: fixed issues caliing ClearWindowSettings() followed by LoadIniSettingsFromMemory().
...
While not done with core, this would be useful to load .ini over a clean slate.
2026-07-15 19:22:44 +02:00
ocornut
0ff4a8a900
Backends: OpenGL2/3: Backup and restore GL_UNPACK state in UpdateTexture(). Amends. ( #9473 , #8802 )
...
Fix setting GL_UNPACK_ROW_LENGTH twice.
2026-07-15 18:20:05 +02:00
Turtle Dove
e3927dc004
Backends: OpenGL2/3: Backup and restore GL_UNPACK state in UpdateTexture() ( #9473 , #8802 )
2026-07-15 18:16:57 +02:00
Turtle Dove
35a7e8e864
Backends: SDL2: restore SDL_StartTextInput()/SDL_StopTextInput() calls on Android ( #7636 , #9474 )
2026-07-15 17:59:25 +02:00
Turtle Dove
909082890a
Backends: Android: clear mouse position on touch release. ( #6627 , #9474 )
2026-07-15 17:36:39 +02:00
Turtle Dove
0302703a7d
CI: Android: Gradle 9.4.1 via setup-gradle action for AGP 9.2.0 ( #8878 ) ( #9467 )
2026-07-15 14:36:59 +02:00
ShiroKSH
0720d59bb7
Tables: validate ini settings column count. ( #9472 )
...
+ Amend with comment by ocornut.
2026-07-15 14:16:31 +02:00
ocornut
addbfa5021
Settings: fixed ConfigIniSettingsAutoDiscardMonths not calling Cleanup ( #9460 , #9471 )
2026-07-15 13:57:48 +02:00
ocornut
bad1ee71f8
Backends: SDL_Renderer3: fixed changing scale mode not actually working on all platforms. ( #7616 , #9470 , #9378 )
2026-07-15 13:44:03 +02:00
ShiroKSH
003ee19d9e
Backends: SDL_Renderer3: fixed default sampler not being Linear. ( #7616 , #9470 , #9378 )
2026-07-15 13:44:01 +02:00
ocornut
b62bfd6b06
InputText: reworked io.ConfigInputTextEnterKeepActive mode so that pressing Ctrl+Enter or Shift+Enter still allows to deactivate.
...
cc #9239
2026-07-10 21:36:43 +02:00
ocornut
da137cbbb0
(Breaking) Drag and Drop: commented out legacy name ImGuiDragDropFlags_SourceAutoExpirePayload. Use ImGuiDragDropFlags_PayloadAutoExpire.
2026-07-08 18:40:29 +02:00
ocornut
9bb131fb2f
CI: enable Metal4 examples. ( #9466 , #9451 )
...
(Untested)
2026-07-08 18:28:37 +02:00
Jonathan Hoffstadt
62399b5bfe
Examples: Apple + Metal4: add example ( #9466 , #9451 )
...
+ Amend edit to EXAMPLES.md, comment build.xml
2026-07-08 18:04:30 +02:00
ocornut
68fce9f3bd
Settings: added DiscardAll option to CleanupIniSettings() / ImGuiSettingsCleanupArgs. ( #9460 )
...
+ Demo: tweak for scaling.
2026-07-08 15:03:19 +02:00
ocornut
f903a7e8e2
Settings: fixed Windows not honoring DiscardWhenMissingDate. ( #9460 )
2026-07-07 22:52:47 +02:00
ocornut
112d6d9eab
Settings: added a type name filter to CleanupIniSettings() / ImGuiSettingsCleanupArgs. Amends. ( #9460 )
...
Request hash because storing const char* strings in struct is not entirely zen. Amend 2c49da4.
2026-07-07 22:30:15 +02:00
ocornut
2c49da44be
Settings: added a type name filter to CleanupIniSettings() / ImGuiSettingsCleanupArgs. ( #9460 )
2026-07-07 22:18:01 +02:00
ocornut
85593d0869
Tables, Settings: make TableSettingsCreate() recycle existing unbound entry (might happen after a GC or anything clearing table->SettingsOffset. ( #9460 , #9108 )
2026-07-07 22:06:43 +02:00
ocornut
d1eb8d031c
Settings: added explicit DiscardWhenMissingDate. ( #9460 , #9108 )
2026-07-07 22:00:26 +02:00
Kian
481f2cea17
Backends: Metal4: added ImTextureID tex_id to residency set. ( #9461 , #9458 , #9451 )
...
This will resolve runtime errors identified by XCode's Metal Shader Validator.
2026-07-07 16:35:23 +02:00
Kian
520a29dd51
Backends: Metal4: added metal-cpp support. ( #9461 )
...
with amends.
2026-07-07 16:29:02 +02:00
ocornut
cfdc953ba9
ColorPicker: added option to fix Saturation/Value triangle in wheel picker. Amends. ( #9337 )
...
The heat makes this week really not good with human mistakes I guess.
2026-07-07 16:21:36 +02:00
ocornut
f626c1c793
ColorPicker: added option to fix Saturation/Value triangle in wheel picker. Amends. ( #9337 )
...
ConfigColorPickerRotateTriangle -> !ImGuiColorEditFlags_PickerNoRotate
2026-07-07 16:18:34 +02:00
ocornut
5d56c09432
ColorPicker: added option to fix Saturation/Value triangle in wheel picker. Amends. ( #9337 )
2026-07-07 16:14:13 +02:00
SeanTheBuilder1
0785cdb2bb
ColorPicker: added option to fix Saturation/Value triangle in wheel picker. ( #9337 )
2026-07-07 16:14:11 +02:00
ocornut
aca69173df
(Breaking) ColorEdit: obsoleted SetColorEditOptions() function in favor of poking to io.ConfigColorEditFlags. (Amend 0e479b9, 9f7d808)
...
Apologies, 9f7d808 was extremely flaky.
2026-07-07 16:10:35 +02:00
ocornut
9f7d8086fe
(Breaking) ColorEdit: obsoleted SetColorEditOptions() function in favor of poking to io.ColorEditFlags. (Amend 0e479b9)
...
Reordered IO fields breaks ABI backward compat which was never guaranteed. Occasional breaking is a good way to enforce that lack of guarantee!
2026-07-06 16:02:17 +02:00
ocornut
0e479b9554
(Breaking) ColorEdit: obsoleted SetColorEditOptions() function in favor of poking to style.ColorEditFlags.
2026-07-06 15:34:13 +02:00
ocornut
776bf2ab0d
Examples: OpenGL3+Win32: rework OpenGL initialization to allow Wine compatibility. Fix. ( #9427 , #6577 )
...
Fixed commented out test code.
2026-07-03 18:59:37 +02:00
ocornut
4f1ea369ea
Examples: OpenGL3+Win32: rework OpenGL initialization to allow Wine compatibility. ( #9427 , #6577 )
2026-07-03 18:57:14 +02:00
ocornut
a977144955
Examples: OpenGL3+GLFW,SDL2,SDL3: improve Wine compatibility by passing empty GLSL version to ImGui_ImplOpenGL3_Init(). ( #9427 , #6577 )
2026-07-03 18:57:10 +02:00
ocornut
e616ace74d
CI, Backends: Metal4: fixed CI, added comments. ( #9458 )
2026-07-03 17:48:11 +02:00
ocornut
5c2160ac85
Settings, IO: move ConfigDebugIniSettings in same section.
2026-07-03 16:56:38 +02:00
ocornut
5fb77dfde1
Settings: added io.ConfigIniSettingsAutoDiscardMonths, trimming tool in in Metrics->Settings + internal CleanupIniSettings(). ( #9460 )
...
cc #437 #2564
2026-07-03 16:36:46 +02:00
ocornut
f7e8343ee9
Settings, IO: added io.ConfigIniSettingsSaveLastUsedDate, platform_io.Platform_SessionDate, IMGUI_DISABLE_TIME_FUNCTIONS(). ( #9460 )
...
cc #437
2026-07-03 16:36:45 +02:00
ocornut
7d43c74b59
CI: update PVS studio. Reduce Windows CI workload for typical push.
2026-07-02 15:14:32 +02:00
ocornut
8fc25800e0
Fonts, Context: assert that ImFontAtlas has no other references when destroying an owned atlas. ( #9426 )
2026-07-02 15:02:59 +02:00
ocornut
6824e2c2e4
Examples: Android: update to AGP 9.2.0 to support Gradle 9.6.0.
2026-07-02 14:26:46 +02:00
ocornut
e9ea19086b
CI: fixed Android build on Ubuntu-latest by expliciting Gradle version to < 9.x.
2026-07-02 14:13:32 +02:00
ocornut
caddd26fb9
Backends: Metal4: minor tweaks/comments. ( #9458 , #9451 )
2026-07-02 12:09:06 +02:00