mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Fixed focus events triggered by window frame.
This commit is contained in:
+12
-6
@@ -913,20 +913,26 @@ static void processEvent(XEvent *event)
|
||||
|
||||
case FocusIn:
|
||||
{
|
||||
_glfwInputWindowFocus(window, GL_TRUE);
|
||||
if (event->xfocus.mode == NotifyNormal)
|
||||
{
|
||||
_glfwInputWindowFocus(window, GL_TRUE);
|
||||
|
||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||
disableCursor(window);
|
||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||
disableCursor(window);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case FocusOut:
|
||||
{
|
||||
_glfwInputWindowFocus(window, GL_FALSE);
|
||||
if (event->xfocus.mode == NotifyNormal)
|
||||
{
|
||||
_glfwInputWindowFocus(window, GL_FALSE);
|
||||
|
||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||
restoreCursor(window);
|
||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||
restoreCursor(window);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user