Comments for Linux/Mac (#2117)

This commit is contained in:
omar 2019-02-19 16:36:06 +01:00
parent 9dc02464a4
commit ff0f9aa856

View File

@ -471,6 +471,7 @@ static void ImGui_ImplGlfw_DestroyWindow(ImGuiViewport* viewport)
viewport->PlatformUserData = viewport->PlatformHandle = NULL; viewport->PlatformUserData = viewport->PlatformHandle = NULL;
} }
// FIXME-VIEWPORT: Implement same work-around for Linux/OSX in the meanwhile.
#if defined(_WIN32) && GLFW_HAS_GLFW_HOVERED #if defined(_WIN32) && GLFW_HAS_GLFW_HOVERED
static WNDPROC g_GlfwWndProc = NULL; static WNDPROC g_GlfwWndProc = NULL;
static LRESULT CALLBACK WndProcNoInputs(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) static LRESULT CALLBACK WndProcNoInputs(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
@ -513,7 +514,9 @@ static void ImGui_ImplGlfw_ShowWindow(ImGuiViewport* viewport)
#endif #endif
// GLFW hack: GLFW 3.2 has a bug where glfwShowWindow() also activates/focus the window. // GLFW hack: GLFW 3.2 has a bug where glfwShowWindow() also activates/focus the window.
// The fix was pushed to GLFW repository on 2018/01/09 and should be included in GLFW 3.3. See https://github.com/glfw/glfw/issues/1179 // The fix was pushed to GLFW repository on 2018/01/09 and should be included in GLFW 3.3 via a GLFW_FOCUS_ON_SHOW window attribute.
// See https://github.com/glfw/glfw/issues/1189
// FIXME-VIEWPORT: Implement same work-around for Linux/OSX in the meanwhile.
if (viewport->Flags & ImGuiViewportFlags_NoFocusOnAppearing) if (viewport->Flags & ImGuiViewportFlags_NoFocusOnAppearing)
{ {
::ShowWindow(hwnd, SW_SHOWNA); ::ShowWindow(hwnd, SW_SHOWNA);