Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Use GLFW_CURSOR_DISABLED (glfw's native mouse restriction)
On Wayland, clients cannot move the mouse pointer.
Mouse constraints, as required for 3D camera movement, are an explicit specific thing,
and glfw supports it with GLFW_CURSOR_DISABLED.
Use DISABLED, unless we're in a menu in windowed mode, where HIDDEN is still appropriate.
  • Loading branch information
unrelentingtech committed Sep 28, 2020
1 parent b95accb commit 0205960a2fe13174b5dc17abf080b6821a3c883a
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/skel/glfw/glfw.cpp
@@ -1628,6 +1628,8 @@ main(int argc, char *argv[])
#endif #endif
{ {
glfwPollEvents(); glfwPollEvents();
glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR,
(FrontEndMenuManager.m_bMenuActive && !PSGLOBAL(fullScreen)) ? GLFW_CURSOR_HIDDEN : GLFW_CURSOR_DISABLED);
if( ForegroundApp ) if( ForegroundApp )
{ {
switch ( gGameState ) switch ( gGameState )

0 comments on commit 0205960

Please sign in to comment.