You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backends/imgui_impl_dx10.cpp
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
// CHANGELOG
15
15
// (minor and older changes stripped away, please see git history for details)
16
-
//2021-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
16
+
//2022-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
17
17
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
18
18
// 2021-05-19: DirectX10: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
19
19
// 2021-02-18: DirectX10: Change blending equation to preserve alpha in output buffer.
Copy file name to clipboardExpand all lines: backends/imgui_impl_dx11.cpp
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
// CHANGELOG
15
15
// (minor and older changes stripped away, please see git history for details)
16
-
//2021-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
16
+
//2022-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
17
17
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
18
18
// 2021-05-19: DirectX11: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
19
19
// 2021-02-18: DirectX11: Change blending equation to preserve alpha in output buffer.
Copy file name to clipboardExpand all lines: backends/imgui_impl_dx12.cpp
+1-1
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@
22
22
23
23
// CHANGELOG
24
24
// (minor and older changes stripped away, please see git history for details)
25
-
//2021-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
25
+
//2022-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
26
26
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
27
27
// 2021-05-19: DirectX12: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
28
28
// 2021-02-18: DirectX12: Change blending equation to preserve alpha in output buffer.
Copy file name to clipboardExpand all lines: backends/imgui_impl_dx9.cpp
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
// CHANGELOG
15
15
// (minor and older changes stripped away, please see git history for details)
16
-
//2021-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
16
+
//2022-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
17
17
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
18
18
// 2021-06-25: DirectX9: Explicitly disable texture state stages after >= 1.
19
19
// 2021-05-19: DirectX9: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
Copy file name to clipboardExpand all lines: backends/imgui_impl_glfw.cpp
+63-40
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,8 @@
20
20
21
21
// CHANGELOG
22
22
// (minor and older changes stripped away, please see git history for details)
23
-
// 2021-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
23
+
// 2022-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
24
+
// 2022-01-12: *BREAKING CHANGE*: Now using glfwSetCursorPosCallback(). If you called ImGui_ImplGlfw_InitXXX() with install_callbacks = false, you MUST install glfwSetCursorPosCallback() and forward it to the backend via ImGui_ImplGlfw_CursorPosCallback().
24
25
// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
25
26
// 2022-01-05: Inputs: Converting GLFW untranslated keycodes back to translated keycodes (in the ImGui_ImplGlfw_KeyCallback() function) in order to match the behavior of every other backend, and facilitate the use of GLFW with lettered-shortcuts API.
26
27
// 2021-08-17: *BREAKING CHANGE*: Now using glfwSetWindowFocusCallback() to calling io.AddFocusEvent(). If you called ImGui_ImplGlfw_InitXXX() with install_callbacks = false, you MUST install glfwSetWindowFocusCallback() and forward it to the backend via ImGui_ImplGlfw_WindowFocusCallback().
@@ -111,6 +112,7 @@ struct ImGui_ImplGlfw_Data
111
112
112
113
// Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any.
113
114
GLFWwindowfocusfun PrevUserCallbackWindowFocus;
115
+
GLFWcursorposfun PrevUserCallbackCursorPos;
114
116
GLFWcursorenterfun PrevUserCallbackCursorEnter;
115
117
GLFWmousebuttonfun PrevUserCallbackMousebutton;
116
118
GLFWscrollfun PrevUserCallbackScroll;
@@ -336,16 +338,37 @@ void ImGui_ImplGlfw_WindowFocusCallback(GLFWwindow* window, int focused)
// (Optional) Fallback to provide mouse position when focused (ImGui_ImplGlfw_CursorPosCallback already provides this when hovered or captured)
551
+
if (bd->MouseWindow == NULL)
546
552
{
547
-
// Single viewport mode: mouse position in client window coordinates (io.MousePos is (0,0) when the mouse is on the upper-left corner of the app window)
553
+
double mouse_x, mouse_y;
554
+
glfwGetCursorPos(window, &mouse_x, &mouse_y);
555
+
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
556
+
{
557
+
// Single viewport mode: mouse position in client window coordinates (io.MousePos is (0,0) when the mouse is on the upper-left corner of the app window)
558
+
// Multi-viewport mode: mouse position in OS absolute coordinates (io.MousePos is (0,0) when the mouse is on the upper-left of the primary monitor)
// - When calling Init with 'install_callbacks=true': GLFW callbacks will be installed for you. They will call user's previously installed callbacks, if any.
39
39
// - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call those function yourself from your own GLFW callbacks.
Copy file name to clipboardExpand all lines: backends/imgui_impl_opengl2.cpp
+1-1
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@
20
20
21
21
// CHANGELOG
22
22
// (minor and older changes stripped away, please see git history for details)
23
-
//2021-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
23
+
//2022-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
24
24
// 2021-12-08: OpenGL: Fixed mishandling of the the ImDrawCmd::IdxOffset field! This is an old bug but it never had an effect until some internal rendering changes in 1.86.
25
25
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
26
26
// 2021-05-19: OpenGL: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
Copy file name to clipboardExpand all lines: backends/imgui_impl_osx.h
+1
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy kVK_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
8
8
// [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this backend).
9
9
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
0 commit comments