mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Remove unnecessary function calls
glfwSetInputMode is a no-op if the passed in mode is the same as the current mode anyway.
This commit is contained in:
@@ -74,7 +74,7 @@ is_window_ready_for_callbacks() {
|
||||
|
||||
static inline void
|
||||
show_mouse_cursor(GLFWwindow *w) {
|
||||
if (glfwGetInputMode(w, GLFW_CURSOR) != GLFW_CURSOR_NORMAL) { glfwSetInputMode(w, GLFW_CURSOR, GLFW_CURSOR_NORMAL); }
|
||||
glfwSetInputMode(w, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -620,9 +620,7 @@ set_os_window_title(OSWindow *w, const char *title) {
|
||||
|
||||
void
|
||||
hide_mouse(OSWindow *w) {
|
||||
if (glfwGetInputMode(w->handle, GLFW_CURSOR) != GLFW_CURSOR_HIDDEN) {
|
||||
glfwSetInputMode(w->handle, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||
}
|
||||
glfwSetInputMode(w->handle, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user