mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-10-26 12:27:30 +00:00 
			
		
		
		
	Viewport: Clamp windows within monitors + fallback rescue window when it is out of sight (e.g. removed monitor, changed resolution) + Win32: declare primary monitor at the beginning of the list. (#1542)
This commit is contained in:
		| @@ -578,7 +578,11 @@ static BOOL CALLBACK ImGui_ImplWin32_UpdateMonitors_EnumFunc(HMONITOR monitor, H | ||||
|     imgui_monitor.WorkMin = ImVec2((float)info.rcWork.left, (float)info.rcWork.top); | ||||
|     imgui_monitor.WorkMax = ImVec2((float)info.rcWork.right, (float)info.rcWork.bottom); | ||||
|     imgui_monitor.DpiScale = ImGui_ImplWin32_GetDpiScaleForMonitor(monitor); | ||||
|     ImGui::GetPlatformIO().Monitors.push_back(imgui_monitor); | ||||
|     ImGuiPlatformIO& io = ImGui::GetPlatformIO(); | ||||
|     if (info.dwFlags & MONITORINFOF_PRIMARY) | ||||
|         io.Monitors.push_front(imgui_monitor); | ||||
|     else | ||||
|         io.Monitors.push_back(imgui_monitor); | ||||
|     return TRUE; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 omar
					omar