mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-08 15:35:50 +01:00
Merge d44e4c09a9d39d2a2bb3ed64932d2bf2f2d2729e into 1f3ee75ee40c7f224714cd6896f152a902e81652
This commit is contained in:
commit
db488ea0f5
@ -31,6 +31,7 @@
|
||||
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2026-XX-XX: [Docking] Multi-viewport: treat different window position reported after glfwSetWindowPos() as an actual platform move. (#9356, #9398)
|
||||
// 2026-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
||||
// 2026-09-15: [Docking] Fixed applying mouse cursor shapes to secondary viewports (broken in 1.92.6, 2025-12-10).
|
||||
// 2026-04-21: Added a Win32-specific implementation of ImGui_ImplGlfw_GetContentScaleXXXX functions for legacy GLFW 3.2.
|
||||
@ -1320,7 +1321,7 @@ static void ImGui_ImplGlfw_WindowCloseCallback(GLFWwindow* window)
|
||||
// - on Linux it is queued and invoked during glfwPollEvents()
|
||||
// Because the event doesn't always fire on glfwSetWindowXXX() we use a frame counter tag to only
|
||||
// ignore recent glfwSetWindowXXX() calls.
|
||||
static void ImGui_ImplGlfw_WindowPosCallback(GLFWwindow* window, int, int)
|
||||
static void ImGui_ImplGlfw_WindowPosCallback(GLFWwindow* window, int x, int y)
|
||||
{
|
||||
if (ImGuiViewport* viewport = ImGui::FindViewportByPlatformHandle(window))
|
||||
{
|
||||
@ -1328,7 +1329,10 @@ static void ImGui_ImplGlfw_WindowPosCallback(GLFWwindow* window, int, int)
|
||||
{
|
||||
bool ignore_event = (ImGui::GetFrameCount() <= vd->IgnoreWindowPosEventFrame + 1);
|
||||
//data->IgnoreWindowPosEventFrame = -1;
|
||||
if (ignore_event)
|
||||
// The event may report a different position than requested when the window manager
|
||||
// clamps/moves the platform window (e.g. Linux/X11 near monitor edges). In that case
|
||||
// keep the viewport in sync with the real platform position instead of ignoring it.
|
||||
if (ignore_event && x == (int)viewport->Pos.x && y == (int)viewport->Pos.y)
|
||||
return;
|
||||
}
|
||||
viewport->PlatformRequestMove = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user