mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 09:01:46 +00:00
Added x11 support for monitor PnP detection.
This commit is contained in:
parent
df64773a44
commit
a69974403e
@ -1366,6 +1366,7 @@ static void processSingleEvent(void)
|
|||||||
{
|
{
|
||||||
// Show XRandR that we really care
|
// Show XRandR that we really care
|
||||||
XRRUpdateConfiguration(&event);
|
XRRUpdateConfiguration(&event);
|
||||||
|
_glfwRefreshMonitors();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1423,8 +1424,6 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
|
|||||||
if (!createWindow(window, wndconfig))
|
if (!createWindow(window, wndconfig))
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
if (wndconfig->mode == GLFW_FULLSCREEN)
|
|
||||||
{
|
|
||||||
#if defined(_GLFW_HAS_XRANDR)
|
#if defined(_GLFW_HAS_XRANDR)
|
||||||
// Request screen change notifications
|
// Request screen change notifications
|
||||||
if (_glfwLibrary.X11.RandR.available)
|
if (_glfwLibrary.X11.RandR.available)
|
||||||
@ -1435,6 +1434,8 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
#endif /*_GLFW_HAS_XRANDR*/
|
#endif /*_GLFW_HAS_XRANDR*/
|
||||||
|
|
||||||
|
if (wndconfig->mode == GLFW_FULLSCREEN)
|
||||||
|
{
|
||||||
enterFullscreenMode(window);
|
enterFullscreenMode(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ static void char_callback(GLFWwindow window, int character)
|
|||||||
|
|
||||||
void monitor_callback(GLFWmonitor monitor, int event)
|
void monitor_callback(GLFWmonitor monitor, int event)
|
||||||
{
|
{
|
||||||
printf("%08x at %0.3f: Monitor %s %s",
|
printf("%08x at %0.3f: Monitor %s %s\n",
|
||||||
counter++,
|
counter++,
|
||||||
glfwGetTime(),
|
glfwGetTime(),
|
||||||
glfwGetMonitorString(monitor, GLFW_MONITOR_NAME),
|
glfwGetMonitorString(monitor, GLFW_MONITOR_NAME),
|
||||||
|
Loading…
Reference in New Issue
Block a user