diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 0531da37..513cd335 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -77,6 +77,7 @@ Other Changes: - Error handling: Assert if user mistakenly calls End() instead of EndChild() on a child window. (#1651) - Misc: Optimized storage of window settings data (reducing allocation count). - Misc: Windows: Do not use _wfopen() if IMGUI_DISABLE_WIN32_FUNCTIONS is defined. (#2815) +- Misc: Windows: Disabled win32 function by default when building with UWP. (#2892, #2895) - Misc: Using static_assert() when using C++11, instead of our own construct (avoid zealous Clang warnings). - Docs: Improved and moved FAQ to docs/FAQ.md so it can be readable on the web. [@ButternCream, @ocornut] - Docs: Added permanent redirect from https://www.dearimgui.org/faq to FAQ page. diff --git a/imgui.cpp b/imgui.cpp index 3e564668..bfe4b178 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9483,6 +9483,10 @@ static void WindowSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettingsHandl #else #include #endif +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) // UWP doesn't have Win32 functions +#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS +#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS +#endif #elif defined(__APPLE__) #include #endif