Merge branch 'glfw_upstream' of https://github.com/Luflosi/kitty

This commit is contained in:
Kovid Goyal 2020-07-11 22:26:32 +05:30
commit 64dee63b73
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

16
glfw/x11_window.c vendored
View File

@ -2460,11 +2460,19 @@ int _glfwPlatformWindowHovered(_GLFWwindow* window)
int rootX, rootY, childX, childY; int rootX, rootY, childX, childY;
unsigned int mask; unsigned int mask;
if (!XQueryPointer(_glfw.x11.display, w, _glfwGrabErrorHandlerX11();
&root, &w, &rootX, &rootY, &childX, &childY, &mask))
{ const Bool result = XQueryPointer(_glfw.x11.display, w,
&root, &w, &rootX, &rootY,
&childX, &childY, &mask);
_glfwReleaseErrorHandlerX11();
if (_glfw.x11.errorCode == BadWindow)
w = _glfw.x11.root;
if (!result)
return false; return false;
}
if (w == window->x11.handle) if (w == window->x11.handle)
return true; return true;