mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-07 05:43:17 +00:00
Backends: GLFW: Fixed not installing WndProc hook in all GLFW version, so AddMouseSourceEvent() logic was missing for some viewports.
This commit is contained in:
@@ -1284,12 +1284,10 @@ static void ImGui_ImplGlfw_ShowWindow(ImGuiViewport* viewport)
|
||||
::SetWindowLong(hwnd, GWL_EXSTYLE, ex_style);
|
||||
}
|
||||
|
||||
// GLFW hack: install hook for WM_NCHITTEST message handler
|
||||
#if !GLFW_HAS_MOUSE_PASSTHROUGH && GLFW_HAS_WINDOW_HOVERED && defined(_WIN32)
|
||||
// GLFW hack: install WndProc for mouse source event and WM_NCHITTEST message handler.
|
||||
::SetPropA(hwnd, "IMGUI_VIEWPORT", viewport);
|
||||
vd->PrevWndProc = (WNDPROC)::GetWindowLongPtrW(hwnd, GWLP_WNDPROC);
|
||||
::SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ImGui_ImplGlfw_WndProc);
|
||||
#endif
|
||||
|
||||
#if !GLFW_HAS_FOCUS_ON_SHOW
|
||||
// GLFW hack: GLFW 3.2 has a bug where glfwShowWindow() also activates/focus the window.
|
||||
|
||||
@@ -469,6 +469,9 @@ Docking+Viewports Branch:
|
||||
- Backends: SDL3: macOS: Fixed secondary-viewports not appearing on a different
|
||||
monitor than the main viewport. Because SDL_SetWindowParent() seems to restrict it.
|
||||
- Backends: GLFW: Disable multi-viewports under Wayland (require GLFW 3.4). (#8587)
|
||||
- Backends: GLFW: Fixed an issue where Win32 specific WndProc hook was not installed
|
||||
for all GLFW version, preventing mouse vs touch detection from working on
|
||||
secondary viewports.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user