1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Changed default cursor mode for fullscreen.

This commit is contained in:
Camilla Berglund 2013-04-10 01:57:43 +02:00
parent 8282a8fbe0
commit 159f9b9526
3 changed files with 3 additions and 9 deletions

View File

@ -313,6 +313,7 @@ GLFW.
* Changed `glfwGetVideoModes` to return a dynamic, unlimited number of video * Changed `glfwGetVideoModes` to return a dynamic, unlimited number of video
modes for the specified monitor modes for the specified monitor
* Changed cursor position to double-precision floating-point * Changed cursor position to double-precision floating-point
* Changed default cursor mode for fullscreen to normal
* Renamed `glfw.h` to `glfw3.h` to avoid conflicts with 2.x series * Renamed `glfw.h` to `glfw3.h` to avoid conflicts with 2.x series
* Renamed `glfwOpenWindowHint` to `glfwWindowHint` * Renamed `glfwOpenWindowHint` to `glfwWindowHint`
* Renamed `GLFW_ACTIVE` to `GLFW_FOCUSED` * Renamed `GLFW_ACTIVE` to `GLFW_FOCUSED`

View File

@ -1148,10 +1148,8 @@ GLFWAPI void glfwWindowHint(int target, int hint);
* invisible using the `GLFW_VISIBLE` window hint, set its position and then * invisible using the `GLFW_VISIBLE` window hint, set its position and then
* show it. * show it.
* *
* @remarks For full screen windows the initial cursor mode is * @remarks If a fullscreen window is active, the screensaver is prohibited
* `GLFW_CURSOR_CAPTURED` and the screen saver is prohibited from starting. * from starting.
* For regular windows the initial cursor mode is `GLFW_CURSOR_NORMAL` and the
* screen saver is allowed to start.
* *
* @remarks **Windows:** If the executable has an icon resource named * @remarks **Windows:** If the executable has an icon resource named
* `GLFW_ICON,` it will be set as the icon for the window. If no such icon is * `GLFW_ICON,` it will be set as the icon for the window. If no such icon is

View File

@ -256,11 +256,6 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
// Restore the previously current context (or NULL) // Restore the previously current context (or NULL)
glfwMakeContextCurrent((GLFWwindow*) previous); glfwMakeContextCurrent((GLFWwindow*) previous);
// The GLFW specification states that fullscreen windows have the cursor
// captured by default
if (wndconfig.monitor)
glfwSetInputMode((GLFWwindow*) window, GLFW_CURSOR_MODE, GLFW_CURSOR_CAPTURED);
if (wndconfig.monitor == NULL && wndconfig.visible) if (wndconfig.monitor == NULL && wndconfig.visible)
glfwShowWindow((GLFWwindow*) window); glfwShowWindow((GLFWwindow*) window);