mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00: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.
(cherry picked from commit 4df24735ef
)
This commit is contained in:
parent
ccbbada181
commit
41bb7b8617
@ -1907,15 +1907,10 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
void _glfwPlatformDestroyWindow(_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);
|
||||||
|
Loading…
Reference in New Issue
Block a user