浏览代码

Wayland: Fix leaks of pointer related objects

Camilla Löwy 3 年之前
父节点
当前提交
03af6b3d4c
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/wl_window.c

+ 6 - 0
src/wl_window.c

@@ -1854,6 +1854,12 @@ void _glfwDestroyWindowWayland(_GLFWwindow* window)
     if (window->wl.idleInhibitor)
         zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);
 
+    if (window->wl.relativePointer)
+        zwp_relative_pointer_v1_destroy(window->wl.relativePointer);
+
+    if (window->wl.lockedPointer)
+        zwp_locked_pointer_v1_destroy(window->wl.lockedPointer);
+
     if (window->context.destroy)
         window->context.destroy(window);