From 41bb7b861706082e4790c0fabd3d1bbbe2382ce5 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. (cherry picked from commit 4df24735ef6bb644830ecdacf89dd04cd8547b86) --- 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 3b72c6aa..87967cc7 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1907,15 +1907,10 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, void _glfwPlatformDestroyWindow(_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);