| 329 | #include <shellapi.h> |
| 330 | |
| 331 | void polymer_app::enter_fullscreen(GLFWwindow * window, int2 & windowedSize, int2 & windowedPos) |
| 332 | { |
| 333 | glfwGetWindowSize(window, &windowedSize.x, &windowedSize.y); |
| 334 | glfwGetWindowPos(window, &windowedPos.x, &windowedPos.y); |
| 335 | |
| 336 | HWND hwnd = glfwGetWin32Window(window); |
| 337 | SetWindowLong(hwnd, GWL_EXSTYLE, 0); |
| 338 | SetWindowLong(hwnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); |
| 339 | SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED | SWP_SHOWWINDOW); |
| 340 | |
| 341 | int32_t newScreenWidth = get_screen_size(window).x; |
| 342 | int32_t newScreenHeight = get_screen_size(window).y; |
| 343 | |
| 344 | int monitorCount; |
| 345 | GLFWmonitor** monitors = glfwGetMonitors(&monitorCount); |
| 346 | int currentMonitor = get_current_monitor(window); |
| 347 | int xpos, ypos; |
| 348 | glfwGetMonitorPos(monitors[currentMonitor], &xpos, &ypos); |
| 349 | |
| 350 | SetWindowPos(hwnd, HWND_TOPMOST, xpos, ypos, (int) newScreenWidth, (int) newScreenHeight, SWP_SHOWWINDOW); |
| 351 | } |
| 352 | |
| 353 | void polymer_app::exit_fullscreen(GLFWwindow * window, const int2 & windowedSize, const int2 & windowedPos) |
| 354 | { |
nothing calls this directly
no test coverage detected