mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Fixed focus events triggered by window frame.
This commit is contained in:
parent
b54c76d6a3
commit
f5a996a5af
|
@ -84,6 +84,7 @@ The following dependencies are needed by the examples and test programs:
|
||||||
`GLX_SGIX_fbconfig` was unavailable
|
`GLX_SGIX_fbconfig` was unavailable
|
||||||
- [X11] Bugfix: The message type of ICCCM protocol events was not checked
|
- [X11] Bugfix: The message type of ICCCM protocol events was not checked
|
||||||
- [X11] Bugfix: `glfwDestroyWindow` did not flush the output buffer.
|
- [X11] Bugfix: `glfwDestroyWindow` did not flush the output buffer.
|
||||||
|
- [X11] Bugfix: Window frame interactions were reported as focus events
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
|
@ -912,21 +912,27 @@ static void processEvent(XEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
|
{
|
||||||
|
if (event->xfocus.mode == NotifyNormal)
|
||||||
{
|
{
|
||||||
_glfwInputWindowFocus(window, GL_TRUE);
|
_glfwInputWindowFocus(window, GL_TRUE);
|
||||||
|
|
||||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||||
disableCursor(window);
|
disableCursor(window);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
|
{
|
||||||
|
if (event->xfocus.mode == NotifyNormal)
|
||||||
{
|
{
|
||||||
_glfwInputWindowFocus(window, GL_FALSE);
|
_glfwInputWindowFocus(window, GL_FALSE);
|
||||||
|
|
||||||
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||||
restoreCursor(window);
|
restoreCursor(window);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user