diff --git a/README.md b/README.md index 8b4a1546..70bd9095 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,8 @@ information on what to include when reporting a bug. ## Changelog + - Added `glfwGetMonitorFromWindow` function to query the monitor where the + largest part of a window is currently located (#1699) - Added `GLFW_PLATFORM` init hint for runtime platform selection (#1958) - Added `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`, `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and `GLFW_PLATFORM_NULL` symbols to diff --git a/docs/window.dox b/docs/window.dox index 3cec6358..f58c1df2 100644 --- a/docs/window.dox +++ b/docs/window.dox @@ -907,6 +907,19 @@ glfwSetWindowIcon(window, 0, NULL); @endcode +@subsection window_monitor_from Window monitor + +Windows are always located on one or more monitors. You can get the +handle for the monitor were the biggest part of a specified window is +currently located with @ref glfwGetMonitorFromWindow + +@code +GLFWmonitor* monitor = glfwGetMonitorFromWindow(window); +@endcode + +This monitor handle is one of those returned by @ref glfwGetMonitors. + + @subsection window_monitor Window monitor Full screen windows are associated with a specific monitor. You can get the