From 4df24735ef6bb644830ecdacf89dd04cd8547b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 13 Jul 2022 14:26:25 +0200 Subject: [PATCH] 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. --- src/wl_window.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index 80c601d0..8ad16cc0 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1843,15 +1843,10 @@ GLFWbool _glfwCreateWindowWayland(_GLFWwindow* window, void _glfwDestroyWindowWayland(_GLFWwindow* window) { if (window == _glfw.wl.pointerFocus) - { _glfw.wl.pointerFocus = NULL; - _glfwInputCursorEnter(window, GLFW_FALSE); - } + if (window == _glfw.wl.keyboardFocus) - { _glfw.wl.keyboardFocus = NULL; - _glfwInputWindowFocus(window, GLFW_FALSE); - } if (window->wl.idleInhibitor) zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);