mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-12 15:59:54 +02:00
Viewport: Merged ImGuiPlatformData into ImGuiPlatformIO. Comments. (#1542)
This commit is contained in:
@ -408,7 +408,7 @@ static void ImGui_ImplWin32_DestroyWindow(ImGuiViewport* viewport)
|
||||
{
|
||||
if (::GetCapture() == data->Hwnd)
|
||||
{
|
||||
// Transfer capture so if we started dragging from a window that later disappears, we'll still release the MOUSEUP event.
|
||||
// Transfer capture so if we started dragging from a window that later disappears, we'll still receive the MOUSEUP event.
|
||||
::ReleaseCapture();
|
||||
::SetCapture(g_hWnd);
|
||||
}
|
||||
@ -540,14 +540,14 @@ static BOOL CALLBACK ImGui_ImplWin32_UpdateMonitors_EnumFunc(HMONITOR, HDC, LPRE
|
||||
ImGuiPlatformMonitor imgui_monitor;
|
||||
imgui_monitor.Pos = ImVec2((float)rect->left, (float)rect->top);
|
||||
imgui_monitor.Size = ImVec2((float)(rect->right - rect->left), (float)(rect->bottom - rect->top));
|
||||
ImGui::GetPlatformData()->Monitors.push_back(imgui_monitor);
|
||||
ImGui::GetPlatformIO().Monitors.push_back(imgui_monitor);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FIXME-PLATFORM: Update list when changed (WM_DISPLAYCHANGE?)
|
||||
static void ImGui_ImplWin32_UpdateMonitors()
|
||||
{
|
||||
ImGui::GetPlatformData()->Monitors.resize(0);
|
||||
ImGui::GetPlatformIO().Monitors.resize(0);
|
||||
::EnumDisplayMonitors(NULL, NULL, ImGui_ImplWin32_UpdateMonitors_EnumFunc, NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user