| 45 | } |
| 46 | |
| 47 | void window_size_callback(GLFWwindow *window, int width, int height) |
| 48 | { |
| 49 | if (auto platform = reinterpret_cast<Platform *>(glfwGetWindowUserPointer(window))) |
| 50 | { |
| 51 | platform->resize(width, height); |
| 52 | |
| 53 | #if defined(VK_USE_PLATFORM_WAYLAND_KHR) |
| 54 | // On Wayland, window may lose focus during resize. Force focus to ensure rendering continues. |
| 55 | platform->set_focus(true); |
| 56 | #endif |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | void window_focus_callback(GLFWwindow *window, int focused) |
| 61 | { |