mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 23:54:37 +00:00
Formatting.
This commit is contained in:
parent
a2dab25b06
commit
b711b2fc72
12
src/window.c
12
src/window.c
@ -100,20 +100,21 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean activated)
|
|||||||
{
|
{
|
||||||
if (activated)
|
if (activated)
|
||||||
{
|
{
|
||||||
if (_glfwLibrary.activeWindow != window)
|
if (_glfwLibrary.activeWindow == window)
|
||||||
{
|
return;
|
||||||
|
|
||||||
_glfwLibrary.activeWindow = window;
|
_glfwLibrary.activeWindow = window;
|
||||||
|
|
||||||
if (_glfwLibrary.windowFocusCallback)
|
if (_glfwLibrary.windowFocusCallback)
|
||||||
_glfwLibrary.windowFocusCallback(window, activated);
|
_glfwLibrary.windowFocusCallback(window, activated);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if (_glfwLibrary.activeWindow == window)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (_glfwLibrary.activeWindow != window)
|
||||||
|
return;
|
||||||
|
|
||||||
// Release all pressed keyboard keys
|
// Release all pressed keyboard keys
|
||||||
for (i = 0; i <= GLFW_KEY_LAST; i++)
|
for (i = 0; i <= GLFW_KEY_LAST; i++)
|
||||||
{
|
{
|
||||||
@ -133,7 +134,6 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean activated)
|
|||||||
if (_glfwLibrary.windowFocusCallback)
|
if (_glfwLibrary.windowFocusCallback)
|
||||||
_glfwLibrary.windowFocusCallback(window, activated);
|
_glfwLibrary.windowFocusCallback(window, activated);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user