From 24a44b9abe7bdb52d23d6553427709f311ba8e7b Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 15 Mar 2023 12:25:20 +0100 Subject: [PATCH 1/6] Version 1.89.5 WIP --- docs/CHANGELOG.txt | 10 ++++++++++ imgui.cpp | 2 +- imgui.h | 6 +++--- imgui_demo.cpp | 2 +- imgui_draw.cpp | 2 +- imgui_internal.h | 2 +- imgui_tables.cpp | 2 +- imgui_widgets.cpp | 2 +- 8 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index c5b4e319..90c682e6 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -31,6 +31,16 @@ HOW TO UPDATE? - Please report any issue! +----------------------------------------------------------------------- + VERSION 1.89.5 WIP (In Progress) +----------------------------------------------------------------------- + +Breaking Changes: + +Other changes: + + + ----------------------------------------------------------------------- VERSION 1.89.4 (Released 2023-03-14) ----------------------------------------------------------------------- diff --git a/imgui.cpp b/imgui.cpp index fa8580cd..226de6a3 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.4 +// dear imgui, v1.89.5 WIP // (main code and documentation) // Help: diff --git a/imgui.h b/imgui.h index beb4feb1..43dfc47a 100644 --- a/imgui.h +++ b/imgui.h @@ -1,4 +1,4 @@ -// dear imgui, v1.89.4 +// dear imgui, v1.89.5 WIP // (headers) // Help: @@ -22,8 +22,8 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345') -#define IMGUI_VERSION "1.89.4" -#define IMGUI_VERSION_NUM 18940 +#define IMGUI_VERSION "1.89.5 WIP" +#define IMGUI_VERSION_NUM 18941 #define IMGUI_HAS_TABLE /* diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 6f6e73d4..c0699d6d 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.4 +// dear imgui, v1.89.5 WIP // (demo code) // Help: diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 031c3e7d..8bfe7a5a 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.4 +// dear imgui, v1.89.5 WIP // (drawing and font code) /* diff --git a/imgui_internal.h b/imgui_internal.h index 20494ab4..471a73f3 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1,4 +1,4 @@ -// dear imgui, v1.89.4 +// dear imgui, v1.89.5 WIP // (internal structures/api) // You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility. diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 3bacc34a..8e92ff2a 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.4 +// dear imgui, v1.89.5 WIP // (tables and columns code) /* diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index ab43ac05..6df09b1b 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.89.4 +// dear imgui, v1.89.5 WIP // (widgets code) /* From 0d606968d886d2c92e0d8e978cfcf52b2d453739 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 15 Mar 2023 12:25:34 +0100 Subject: [PATCH 2/6] Backend: OpenGL3: Amend b0c18166 fix cases where glGetString(GL_VERSION) returns NULL. (#6154, #4445, #3530) --- backends/imgui_impl_opengl3.cpp | 1 + backends/imgui_impl_opengl3_loader.h | 6 +++--- docs/CHANGELOG.txt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backends/imgui_impl_opengl3.cpp b/backends/imgui_impl_opengl3.cpp index 134479fd..7391bb08 100644 --- a/backends/imgui_impl_opengl3.cpp +++ b/backends/imgui_impl_opengl3.cpp @@ -14,6 +14,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2023-03-15: OpenGL: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530) // 2023-03-06: OpenGL: Fixed restoration of a potentially deleted OpenGL program, by calling glIsProgram(). (#6220, #6224) // 2022-11-09: OpenGL: Reverted use of glBufferSubData(), too many corruptions issues + old issues seemingly can't be reproed with Intel drivers nowadays (revert 2021-12-15 and 2022-05-23 changes). // 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11. diff --git a/backends/imgui_impl_opengl3_loader.h b/backends/imgui_impl_opengl3_loader.h index 84a5a4a3..af8d20c4 100644 --- a/backends/imgui_impl_opengl3_loader.h +++ b/backends/imgui_impl_opengl3_loader.h @@ -118,7 +118,7 @@ extern "C" { ** included as . ** ** glcorearb.h includes only APIs in the latest OpenGL core profile -** implementation together with APIs in newer ARB extensions which +** implementation together with APIs in newer ARB extensions which ** can be supported by the core profile. It does not, and never will ** include functionality removed from the core profile, such as ** fixed-function vertex and fragment processing. @@ -692,8 +692,8 @@ static int parse_version(void) if (version.major == 0 && version.minor == 0) { // Query GL_VERSION in desktop GL 2.x, the string will start with "." - const char* gl_version = (const char*)glGetString(GL_VERSION); - sscanf(gl_version, "%d.%d", &version.major, &version.minor); + if (const char* gl_version = (const char*)glGetString(GL_VERSION)) + sscanf(gl_version, "%d.%d", &version.major, &version.minor); } if (version.major < 2) return GL3W_ERROR_OPENGL_VERSION; diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 90c682e6..d2112e75 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -39,6 +39,7 @@ Breaking Changes: Other changes: +- Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530) ----------------------------------------------------------------------- From ae4dad09b56ca94e6f68054b2984fcf435f9bbd4 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 15 Mar 2023 15:04:07 +0100 Subject: [PATCH 3/6] Examples: SDL3: Updated for latest WIP SDL3 branch. (#6243) --- docs/CHANGELOG.txt | 1 + examples/example_sdl3_opengl3/main.cpp | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index d2112e75..b1fcbb7c 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -40,6 +40,7 @@ Breaking Changes: Other changes: - Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530) +- Examples: SDL3: Updated for latest WIP SDL3 branch. (#6243) ----------------------------------------------------------------------- diff --git a/examples/example_sdl3_opengl3/main.cpp b/examples/example_sdl3_opengl3/main.cpp index 26d9546b..99b0ee77 100644 --- a/examples/example_sdl3_opengl3/main.cpp +++ b/examples/example_sdl3_opengl3/main.cpp @@ -25,7 +25,7 @@ int main(int, char**) // Setup SDL if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0) { - printf("Error: %s\n", SDL_GetError()); + printf("Error: SDL_Init(): %s\n", SDL_GetError()); return -1; } @@ -60,11 +60,18 @@ int main(int, char**) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); - SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE); - SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN); + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+OpenGL3 example", 1280, 720, window_flags); + if (window == NULL) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); SDL_GLContext gl_context = SDL_GL_CreateContext(window); SDL_GL_MakeCurrent(window, gl_context); SDL_GL_SetSwapInterval(1); // Enable vsync + SDL_ShowWindow(window); // Setup Dear ImGui context IMGUI_CHECKVERSION(); From 8b6e021f358b27de09ca65d58107bdfa6f69209c Mon Sep 17 00:00:00 2001 From: Ambrose Bonnaire-Sergeant Date: Wed, 15 Mar 2023 10:55:47 -0400 Subject: [PATCH 4/6] Demo: Fixed typos. (#6247) --- docs/CONTRIBUTING.md | 4 ++-- imgui_demo.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index eba3b65c..81a6f0e3 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -2,13 +2,13 @@ ## Index -- [Getting Started & General Advices](#getting-started--general-advices) +- [Getting Started & General Advice](#getting-started--general-advice) - [Issues vs Discussions](#issues-vs-discussions) - [How to open an Issue](#how-to-open-an-issue) - [How to open a Pull Request](#how-to-open-a-pull-request) - [Copyright / Contributor License Agreement](#copyright--contributor-license-agreement) -## Getting Started & General Advices +## Getting Started & General Advice - Article: [How To Ask Good Questions](https://bit.ly/3nwRnx1). - Please browse the [Wiki](https://github.com/ocornut/imgui/wiki) to find code snippets, links and other resources (e.g. [Useful extensions](https://github.com/ocornut/imgui/wiki/Useful-Extensions)). diff --git a/imgui_demo.cpp b/imgui_demo.cpp index c0699d6d..d83daf9d 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -7443,7 +7443,7 @@ static void ShowExampleAppFullscreen(bool* p_open) static ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings; // We demonstrate using the full viewport area or the work area (without menu-bars, task-bars etc.) - // Based on your use case you may want one of the other. + // Based on your use case you may want one or the other. const ImGuiViewport* viewport = ImGui::GetMainViewport(); ImGui::SetNextWindowPos(use_work_area ? viewport->WorkPos : viewport->Pos); ImGui::SetNextWindowSize(use_work_area ? viewport->WorkSize : viewport->Size); From 301c95603993d80c33a23d9c9ef21f8b7b64fdc1 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 15 Mar 2023 17:09:03 +0100 Subject: [PATCH 5/6] Examples: Windows: Added 'misc/debuggers/imgui.natstepfilter' file to all Visual Studio projects. (#3038) --- docs/CHANGELOG.txt | 2 ++ examples/example_allegro5/example_allegro5.vcxproj | 3 ++- .../example_allegro5.vcxproj.filters | 7 +++++-- .../example_glfw_opengl2.vcxproj | 1 + .../example_glfw_opengl2.vcxproj.filters | 3 +++ .../example_glfw_opengl3.vcxproj | 3 ++- .../example_glfw_opengl3.vcxproj.filters | 3 +++ .../example_glfw_vulkan/example_glfw_vulkan.vcxproj | 1 + .../example_glfw_vulkan.vcxproj.filters | 3 +++ .../example_glut_opengl2.vcxproj | 1 + .../example_glut_opengl2.vcxproj.filters | 7 +++++-- .../example_sdl2_directx11.vcxproj | 3 ++- .../example_sdl2_directx11.vcxproj.filters | 5 ++++- .../example_sdl2_opengl2.vcxproj | 3 ++- .../example_sdl2_opengl2.vcxproj.filters | 5 ++++- .../example_sdl2_opengl3.vcxproj | 3 ++- .../example_sdl2_opengl3.vcxproj.filters | 5 ++++- .../example_sdl2_sdlrenderer.vcxproj | 3 ++- .../example_sdl2_sdlrenderer.vcxproj.filters | 5 ++++- .../example_sdl2_vulkan/example_sdl2_vulkan.vcxproj | 3 ++- .../example_sdl2_vulkan.vcxproj.filters | 5 ++++- .../example_sdl3_opengl3.vcxproj | 3 ++- .../example_sdl3_opengl3.vcxproj.filters | 5 ++++- .../example_win32_directx10.vcxproj | 1 + .../example_win32_directx10.vcxproj.filters | 3 +++ .../example_win32_directx11.vcxproj | 1 + .../example_win32_directx11.vcxproj.filters | 3 +++ .../example_win32_directx12.vcxproj | 1 + .../example_win32_directx12.vcxproj.filters | 3 +++ .../example_win32_directx9.vcxproj | 1 + .../example_win32_directx9.vcxproj.filters | 3 +++ misc/debuggers/imgui.natstepfilter | 13 +++++++------ 32 files changed, 87 insertions(+), 24 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index b1fcbb7c..8c3f4066 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -40,6 +40,8 @@ Breaking Changes: Other changes: - Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530) +- Examples: Windows: Added 'misc/debuggers/imgui.natstepfilter' file to all Visual Studio projects, + now that VS 2022 17.6 Preview 2 support adding Debug Step Filter spec files into projects. - Examples: SDL3: Updated for latest WIP SDL3 branch. (#6243) diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj index 69b0ece3..8c549b44 100644 --- a/examples/example_allegro5/example_allegro5.vcxproj +++ b/examples/example_allegro5/example_allegro5.vcxproj @@ -171,10 +171,11 @@ + - + \ No newline at end of file diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters index 7fea78b3..84881d37 100644 --- a/examples/example_allegro5/example_allegro5.vcxproj.filters +++ b/examples/example_allegro5/example_allegro5.vcxproj.filters @@ -52,7 +52,10 @@ - sources + imgui + + + imgui - + \ No newline at end of file diff --git a/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj b/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj index faf6d9a5..82bdac22 100644 --- a/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj +++ b/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj @@ -172,6 +172,7 @@ + diff --git a/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters b/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters index b9efa1b8..049b0b1a 100644 --- a/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters +++ b/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters @@ -57,5 +57,8 @@ imgui + + imgui + \ No newline at end of file diff --git a/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj b/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj index 7721c8ff..0a1c3d6b 100644 --- a/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj +++ b/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj @@ -173,10 +173,11 @@ + - + \ No newline at end of file diff --git a/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters b/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters index 1caab2c6..bc79bb19 100644 --- a/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters +++ b/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters @@ -60,5 +60,8 @@ imgui + + imgui + \ No newline at end of file diff --git a/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj b/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj index ed8fe966..4eb8b7ce 100644 --- a/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj +++ b/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj @@ -176,6 +176,7 @@ + diff --git a/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters b/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters index 234da219..510fc854 100644 --- a/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters +++ b/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters @@ -57,5 +57,8 @@ imgui + + imgui + \ No newline at end of file diff --git a/examples/example_glut_opengl2/example_glut_opengl2.vcxproj b/examples/example_glut_opengl2/example_glut_opengl2.vcxproj index 4c9d00f5..266ac04e 100644 --- a/examples/example_glut_opengl2/example_glut_opengl2.vcxproj +++ b/examples/example_glut_opengl2/example_glut_opengl2.vcxproj @@ -172,6 +172,7 @@ + diff --git a/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters b/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters index 3c017ba9..0ac4a0b2 100644 --- a/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters +++ b/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters @@ -55,7 +55,10 @@ - sources + imgui + + + imgui - + \ No newline at end of file diff --git a/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj b/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj index 27da4835..e6a57f6c 100644 --- a/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj +++ b/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj @@ -173,10 +173,11 @@ + - + \ No newline at end of file diff --git a/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters b/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters index 3476d843..92d11f88 100644 --- a/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters +++ b/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters @@ -56,5 +56,8 @@ imgui + + imgui + - + \ No newline at end of file diff --git a/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj b/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj index a5515113..08a6df9b 100644 --- a/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj +++ b/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj @@ -172,10 +172,11 @@ + - + \ No newline at end of file diff --git a/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters b/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters index 0419ea0d..752a1965 100644 --- a/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters +++ b/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters @@ -57,5 +57,8 @@ imgui + + imgui + - + \ No newline at end of file diff --git a/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj b/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj index d45705ea..21ce0693 100644 --- a/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj +++ b/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj @@ -173,10 +173,11 @@ + - + \ No newline at end of file diff --git a/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters b/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters index fbc39b1e..846d5575 100644 --- a/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters +++ b/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters @@ -60,5 +60,8 @@ imgui + + imgui + - + \ No newline at end of file diff --git a/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj b/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj index df7e1442..35bcfe2e 100644 --- a/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj +++ b/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj @@ -172,10 +172,11 @@ + - + \ No newline at end of file diff --git a/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj.filters b/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj.filters index 6c8f5a1e..ed4fe110 100644 --- a/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj.filters +++ b/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj.filters @@ -57,5 +57,8 @@ imgui + + imgui + - + \ No newline at end of file diff --git a/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj b/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj index 35282cc0..e5cbdc36 100644 --- a/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj +++ b/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj @@ -176,10 +176,11 @@ + - + \ No newline at end of file diff --git a/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters b/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters index d3b12984..ab424851 100644 --- a/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters +++ b/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters @@ -57,5 +57,8 @@ imgui + + imgui + - + \ No newline at end of file diff --git a/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj b/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj index 60c99645..a29e3afd 100644 --- a/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj +++ b/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj @@ -173,10 +173,11 @@ + - + \ No newline at end of file diff --git a/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters b/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters index f590e326..f365473c 100644 --- a/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters +++ b/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters @@ -60,5 +60,8 @@ imgui + + imgui + - + \ No newline at end of file diff --git a/examples/example_win32_directx10/example_win32_directx10.vcxproj b/examples/example_win32_directx10/example_win32_directx10.vcxproj index e71cb0a7..2dc2333e 100644 --- a/examples/example_win32_directx10/example_win32_directx10.vcxproj +++ b/examples/example_win32_directx10/example_win32_directx10.vcxproj @@ -162,6 +162,7 @@ + diff --git a/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters b/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters index 4d8300f9..33ab99b5 100644 --- a/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters +++ b/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters @@ -56,5 +56,8 @@ imgui + + imgui + \ No newline at end of file diff --git a/examples/example_win32_directx11/example_win32_directx11.vcxproj b/examples/example_win32_directx11/example_win32_directx11.vcxproj index 273d351c..3264f509 100644 --- a/examples/example_win32_directx11/example_win32_directx11.vcxproj +++ b/examples/example_win32_directx11/example_win32_directx11.vcxproj @@ -161,6 +161,7 @@ + diff --git a/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters b/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters index 7295997a..63032a6a 100644 --- a/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters +++ b/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters @@ -56,5 +56,8 @@ imgui + + imgui + \ No newline at end of file diff --git a/examples/example_win32_directx12/example_win32_directx12.vcxproj b/examples/example_win32_directx12/example_win32_directx12.vcxproj index e12fa401..9e073774 100644 --- a/examples/example_win32_directx12/example_win32_directx12.vcxproj +++ b/examples/example_win32_directx12/example_win32_directx12.vcxproj @@ -164,6 +164,7 @@ + diff --git a/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters b/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters index 85831ef5..23a99526 100644 --- a/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters +++ b/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters @@ -53,6 +53,9 @@ + + imgui + diff --git a/examples/example_win32_directx9/example_win32_directx9.vcxproj b/examples/example_win32_directx9/example_win32_directx9.vcxproj index e01eca14..44be2247 100644 --- a/examples/example_win32_directx9/example_win32_directx9.vcxproj +++ b/examples/example_win32_directx9/example_win32_directx9.vcxproj @@ -162,6 +162,7 @@ + diff --git a/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters b/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters index 25b787b7..5ed89d6f 100644 --- a/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters +++ b/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters @@ -57,5 +57,8 @@ imgui + + imgui + \ No newline at end of file diff --git a/misc/debuggers/imgui.natstepfilter b/misc/debuggers/imgui.natstepfilter index efd1957b..6825c934 100644 --- a/misc/debuggers/imgui.natstepfilter +++ b/misc/debuggers/imgui.natstepfilter @@ -3,14 +3,15 @@ .natstepfilter file for Visual Studio debugger. Purpose: instruct debugger to skip some functions when using StepInto (F11) -To enable: +Since Visual Studio 2022 version 17.6 Preview 2 (currently available as a "Preview" build on March 14, 2023) +It is possible to add the .natstepfilter file to your project file and it will automatically be used. +(https://developercommunity.visualstudio.com/t/allow-natstepfilter-and-natjmc-to-be-included-as-p/561718) + +For older Visual Studio version prior to 2022 17.6 Preview 2: * copy in %USERPROFILE%\Documents\Visual Studio XXXX\Visualizers (current user) * or copy in %VsInstallDirectory%\Common7\Packages\Debugger\Visualizers (all users) -If you have multiple VS version installed, the version that matters is the one you are using the IDE/debugger of (not the compiling toolset). -This is supported since Visual Studio 2012. - -Unfortunately, unlike .natvis files, it isn't yet possible to include this file in your project :( -You may upvote this: https://developercommunity.visualstudio.com/t/allow-natstepfilter-and-natjmc-to-be-included-as-p/561718 +If you have multiple VS version installed, the version that matters is the one you are using the IDE/debugger +of (not the compiling toolset). This is supported since Visual Studio 2012. More information at: https://docs.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=vs-2019#BKMK_C___Just_My_Code --> From 91577c7f519f127298a42c9fac78260cb11aa6e9 Mon Sep 17 00:00:00 2001 From: Aiekick Date: Thu, 16 Mar 2023 11:58:32 +0100 Subject: [PATCH 6/6] Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) --- backends/imgui_impl_glfw.cpp | 16 ++++++++-------- docs/CHANGELOG.txt | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/backends/imgui_impl_glfw.cpp b/backends/imgui_impl_glfw.cpp index 29d502b0..d5dcb211 100644 --- a/backends/imgui_impl_glfw.cpp +++ b/backends/imgui_impl_glfw.cpp @@ -16,6 +16,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2023-03-16: Inputs: Fixed key modifiers handling on secondary viewports (docking branch). Broken on 2023/01/04. (#6248, #6034) // 2023-03-14: Emscripten: Avoid using glfwGetError() and glfwGetGamepadState() which are not correctly implemented in Emscripten emulation. (#6240) // 2023-02-03: Emscripten: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096) // 2023-01-04: Inputs: Fixed mods state on Linux when using Alt-GR text input (e.g. German keyboard layout), could lead to broken text input. Revert a 2022/01/17 change were we resumed using mods provided by GLFW, turns out they were faulty. @@ -268,14 +269,13 @@ static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key) // X11 does not include current pressed/released modifier key in 'mods' flags submitted by GLFW // See https://github.com/ocornut/imgui/issues/6034 and https://github.com/glfw/glfw/issues/1630 -static void ImGui_ImplGlfw_UpdateKeyModifiers() +static void ImGui_ImplGlfw_UpdateKeyModifiers(GLFWwindow* window) { ImGuiIO& io = ImGui::GetIO(); - ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); - io.AddKeyEvent(ImGuiMod_Ctrl, (glfwGetKey(bd->Window, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS)); - io.AddKeyEvent(ImGuiMod_Shift, (glfwGetKey(bd->Window, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS)); - io.AddKeyEvent(ImGuiMod_Alt, (glfwGetKey(bd->Window, GLFW_KEY_LEFT_ALT) == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_ALT) == GLFW_PRESS)); - io.AddKeyEvent(ImGuiMod_Super, (glfwGetKey(bd->Window, GLFW_KEY_LEFT_SUPER) == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_SUPER) == GLFW_PRESS)); + io.AddKeyEvent(ImGuiMod_Ctrl, (glfwGetKey(window, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS)); + io.AddKeyEvent(ImGuiMod_Shift, (glfwGetKey(window, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS)); + io.AddKeyEvent(ImGuiMod_Alt, (glfwGetKey(window, GLFW_KEY_LEFT_ALT) == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_ALT) == GLFW_PRESS)); + io.AddKeyEvent(ImGuiMod_Super, (glfwGetKey(window, GLFW_KEY_LEFT_SUPER) == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_SUPER) == GLFW_PRESS)); } static bool ImGui_ImplGlfw_ShouldChainCallback(GLFWwindow* window) @@ -290,7 +290,7 @@ void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int acti if (bd->PrevUserCallbackMousebutton != nullptr && ImGui_ImplGlfw_ShouldChainCallback(window)) bd->PrevUserCallbackMousebutton(window, button, action, mods); - ImGui_ImplGlfw_UpdateKeyModifiers(); + ImGui_ImplGlfw_UpdateKeyModifiers(window); ImGuiIO& io = ImGui::GetIO(); if (button >= 0 && button < ImGuiMouseButton_COUNT) @@ -354,7 +354,7 @@ void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int keycode, int scancode, i if (action != GLFW_PRESS && action != GLFW_RELEASE) return; - ImGui_ImplGlfw_UpdateKeyModifiers(); + ImGui_ImplGlfw_UpdateKeyModifiers(window); keycode = ImGui_ImplGlfw_TranslateUntranslatedKey(keycode, scancode); diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 8c3f4066..5aaa1f7c 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -40,6 +40,7 @@ Breaking Changes: Other changes: - Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530) +- Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick] - Examples: Windows: Added 'misc/debuggers/imgui.natstepfilter' file to all Visual Studio projects, now that VS 2022 17.6 Preview 2 support adding Debug Step Filter spec files into projects. - Examples: SDL3: Updated for latest WIP SDL3 branch. (#6243)