Skip to content

Commit

Permalink
X11: Fix cursor hover query retry behavior
Browse files Browse the repository at this point in the history
XQueryPointer returns zero on BadWindow so the retry did not happen.

Related to ceb20c7.

(cherry picked from commit 49dbcfc)
  • Loading branch information
elmindreda committed Jul 16, 2020
1 parent 539f4bd commit 85a169f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/x11_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -2601,11 +2601,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;
}

Expand Down

0 comments on commit 85a169f

Please sign in to comment.