diff --git a/README.md b/README.md index c7cb5c4cd..82d4806a8 100644 --- a/README.md +++ b/README.md @@ -124,8 +124,6 @@ information on what to include when reporting a bug. ## Changelog -- Added `GLFW_FOCUS_ON_SHOW` window hint and attribute to control input focus - on calling show window (#1189) - Added `glfwGetError` function for querying the last error code and its description (#970) - Added `glfwUpdateGamepadMappings` function for importing gamepad mappings in @@ -167,6 +165,8 @@ information on what to include when reporting a bug. - Added `GLFW_HOVERED` window attribute for polling cursor hover state (#1166) - Added `GLFW_CENTER_CURSOR` window hint for controlling cursor centering (#749,#842) +- Added `GLFW_FOCUS_ON_SHOW` window hint and attribute to control input focus + on calling show window (#1189) - Added `GLFW_JOYSTICK_HAT_BUTTONS` init hint (#889) - Added `GLFW_LOCK_KEY_MODS` input mode and `GLFW_MOD_*_LOCK` mod bits (#946) - Added macOS specific `GLFW_COCOA_RETINA_FRAMEBUFFER` window hint diff --git a/src/window.c b/src/window.c index 2616d24a6..4ed415ca2 100644 --- a/src/window.c +++ b/src/window.c @@ -761,7 +761,7 @@ GLFWAPI void glfwShowWindow(GLFWwindow* handle) _glfwPlatformShowWindow(window); - if(window->focusOnShow) + if (window->focusOnShow) _glfwPlatformFocusWindow(window); } diff --git a/tests/windows.c b/tests/windows.c index 7ae13c937..5fed58f33 100644 --- a/tests/windows.c +++ b/tests/windows.c @@ -127,7 +127,7 @@ int main(int argc, char** argv) for (i = 0; i < 4; i++) { int left, top, right, bottom; - if(i) + if (i) glfwWindowHint(GLFW_FOCUS_ON_SHOW, focusOnShow); windows[i] = glfwCreateWindow(200, 200, titles[i], NULL, NULL);