1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Wayland: Do not emit events for destroyed window

During platform window destruction, all of its callbacks have already
been removed, so emitting events for it does nothing.
This commit is contained in:
Camilla Löwy 2022-07-13 14:26:25 +02:00
parent d77aaa770f
commit 4df24735ef

View File

@ -1843,15 +1843,10 @@ GLFWbool _glfwCreateWindowWayland(_GLFWwindow* window,
void _glfwDestroyWindowWayland(_GLFWwindow* window) void _glfwDestroyWindowWayland(_GLFWwindow* window)
{ {
if (window == _glfw.wl.pointerFocus) if (window == _glfw.wl.pointerFocus)
{
_glfw.wl.pointerFocus = NULL; _glfw.wl.pointerFocus = NULL;
_glfwInputCursorEnter(window, GLFW_FALSE);
}
if (window == _glfw.wl.keyboardFocus) if (window == _glfw.wl.keyboardFocus)
{
_glfw.wl.keyboardFocus = NULL; _glfw.wl.keyboardFocus = NULL;
_glfwInputWindowFocus(window, GLFW_FALSE);
}
if (window->wl.idleInhibitor) if (window->wl.idleInhibitor)
zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor); zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);