mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-26 16:05:45 +03:00
Merge d44e4c09a9 into 3bae66c735
This commit is contained in:
commit
d52e0bc875
1 changed files with 6 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue