Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pirvi-public
glfw
Commits
58cc4b2c
Commit
58cc4b2c
authored
Feb 06, 2018
by
Camilla Löwy
Browse files
Move full screen cursor centering to shared code
parent
b0204671
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/cocoa_window.m
View file @
58cc4b2c
...
...
@@ -1178,9 +1178,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
_glfwPlatformShowWindow
(
window
);
_glfwPlatformFocusWindow
(
window
);
acquireMonitor
(
window
);
if
(
wndconfig
->
centerCursor
)
centerCursor
(
window
);
}
return
GLFW_TRUE
;
...
...
src/win32_window.c
View file @
58cc4b2c
...
...
@@ -1244,9 +1244,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
_glfwPlatformFocusWindow
(
window
);
acquireMonitor
(
window
);
fitToMonitor
(
window
);
if
(
wndconfig
->
centerCursor
)
centerCursor
(
window
);
}
return
GLFW_TRUE
;
...
...
src/window.c
View file @
58cc4b2c
...
...
@@ -226,7 +226,16 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
}
}
if
(
!
window
->
monitor
)
if
(
window
->
monitor
)
{
if
(
wndconfig
.
centerCursor
)
{
int
width
,
height
;
_glfwPlatformGetWindowSize
(
window
,
&
width
,
&
height
);
_glfwPlatformSetCursorPos
(
window
,
width
/
2
.
0
,
height
/
2
.
0
);
}
}
else
{
if
(
wndconfig
.
visible
)
{
...
...
src/x11_window.c
View file @
58cc4b2c
...
...
@@ -1975,9 +1975,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
_glfwPlatformShowWindow
(
window
);
updateWindowMode
(
window
);
acquireMonitor
(
window
);
if
(
wndconfig
->
centerCursor
)
centerCursor
(
window
);
}
XFlush
(
_glfw
.
x11
.
display
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment