From a857a353482af06e130978ec20f7f7f86f1e5092 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 18 Sep 2017 20:28:55 +0530 Subject: [PATCH] Unhide mouse cursor on focus in --- kitty/glfw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kitty/glfw.c b/kitty/glfw.c index f314a47ff..82b8893bb 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -104,6 +104,7 @@ scroll_callback(GLFWwindow *w, double xoffset, double yoffset) { static void window_focus_callback(GLFWwindow UNUSED *w, int focused) { global_state.application_focused = focused ? true : false; + if (focused && !global_state.mouse_visible) { glfwSetInputMode(w, GLFW_CURSOR, GLFW_CURSOR_NORMAL); global_state.mouse_visible = true; } double now = monotonic(); global_state.last_mouse_activity_at = now; global_state.cursor_blink_zero_time = now;