From a5a93013b3fb4568d973f4bf237c3cbd611c5497 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 14 Sep 2023 19:54:28 -0700 Subject: [PATCH] if mouse hide setting changes to false, show mouse immediately --- src/Surface.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Surface.zig b/src/Surface.zig index 24b67a647..d4b8bdcc4 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -571,6 +571,11 @@ fn changeConfig(self: *Surface, config: *const configpkg.Config) !void { self.config.deinit(); self.config = derived; + // If our mouse is hidden but we disabled mouse hiding, then show it again. + if (!self.config.mouse_hide_while_typing and self.mouse.hidden) { + self.showMouse(); + } + // We need to store our configs in a heap-allocated pointer so that // our messages aren't huge. var renderer_config_ptr = try self.alloc.create(Renderer.DerivedConfig);