From a5d27764cd504d671214aac998cdee52d2d0e8fb Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 3 Mar 2019 16:15:20 +1100 Subject: [PATCH] support user configuring mouse events to be enabled --- pkg/config/app_config.go | 1 + pkg/gui/gui.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index 9ac2fb904..ac8e52c8c 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -234,6 +234,7 @@ func GetDefaultConfig() []byte { ## stuff relating to the UI scrollHeight: 2 scrollPastBottom: true + mouseEvents: false # will default to true when the feature is complete theme: activeBorderColor: - white diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index a6108738b..a5db4c394 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -550,7 +550,9 @@ func (gui *Gui) Run() error { } defer g.Close() - // g.Mouse = true // disabling until this feature is ready + if gui.Config.GetUserConfig().GetBool("gui.mouseEvents") { + g.Mouse = true + } gui.g = g // TODO: always use gui.g rather than passing g around everywhere