Fixed uncaught BadWindow in EWMH check.

Fixes #234.
This commit is contained in:
Camilla Berglund
2014-02-11 15:46:54 +01:00
parent 7f4e947447
commit 69e10b88b0
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -359,6 +359,8 @@ static void detectEWMH(void)
return;
}
_glfwGrabXErrorHandler();
// It should be the ID of a child window (of the root)
// Then we look for the same property on the child window
if (_glfwGetWindowProperty(*windowFromRoot,
@@ -371,6 +373,10 @@ static void detectEWMH(void)
return;
}
_glfwReleaseXErrorHandler();
if (_glfw.x11.errorCode != Success)
return;
// It should be the ID of that same child window
if (*windowFromRoot != *windowFromChild)
{