소스 검색

X11: Fix cursor hover query retry behavior

XQueryPointer returns zero on BadWindow so the retry did not happen.

Related to ceb20c7f97994106db17cc66bd8abad331bc355e.
Camilla Löwy 5 년 전
부모
커밋
49dbcfcb8c
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      src/x11_window.c

+ 2 - 4
src/x11_window.c

@@ -2586,11 +2586,9 @@ int _glfwPlatformWindowHovered(_GLFWwindow* window)
 
         if (_glfw.x11.errorCode == BadWindow)
             w = _glfw.x11.root;
-
-        if (!result)
+        else if (!result)
             return GLFW_FALSE;
-
-        if (w == window->x11.handle)
+        else if (w == window->x11.handle)
             return GLFW_TRUE;
     }