Disable Win32 clipboard and IME functions when build target UWP (#2892, #2895)

This commit is contained in:
Tracy Ma 2019-11-15 16:51:48 +08:00 committed by omar
parent be05e12e21
commit 8f40020ca6
2 changed files with 5 additions and 0 deletions

View File

@ -77,6 +77,7 @@ Other Changes:
- Error handling: Assert if user mistakenly calls End() instead of EndChild() on a child window. (#1651) - 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: 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: 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). - 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: 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. - Docs: Added permanent redirect from https://www.dearimgui.org/faq to FAQ page.

View File

@ -9483,6 +9483,10 @@ static void WindowSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettingsHandl
#else #else
#include <windows.h> #include <windows.h>
#endif #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__) #elif defined(__APPLE__)
#include <TargetConditionals.h> #include <TargetConditionals.h>
#endif #endif