wayland: Implement glfwSetWindowMonitor

This commit is contained in:
Emmanuel Gil Peyrot 2016-04-09 00:53:03 +01:00 committed by Camilla Berglund
parent 5034c6c65e
commit 71cedc6cfe

View File

@ -558,8 +558,19 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
int width, int height,
int refreshRate)
{
// TODO
fprintf(stderr, "_glfwPlatformSetWindowMonitor not implemented yet\n");
if (monitor)
{
wl_shell_surface_set_fullscreen(
window->wl.shell_surface,
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
refreshRate * 1000, // Convert Hz to mHz.
monitor->wl.output);
}
else
{
wl_shell_surface_set_toplevel(window->wl.shell_surface);
}
_glfwInputWindowMonitorChange(window, monitor);
}
int _glfwPlatformWindowFocused(_GLFWwindow* window)