mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
wayland: Implement glfwSetWindowMonitor
This commit is contained in:
parent
5034c6c65e
commit
71cedc6cfe
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user