diff --git a/main.go b/main.go index 6f7739f..68745b6 100644 --- a/main.go +++ b/main.go @@ -519,6 +519,9 @@ func main() { resultWindow.SetEvents(int(gdk.ALL_EVENTS_MASK)) resultWindow.SetPolicy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + // On touch screen we don't want the button-release-event to launch the app if the user just wanted to scroll the + // window. Let's forbid doing so if the content has been scrolled. We will reset the value on button-press-event. + // Resolves https://github.com/nwg-piotr/nwg-drawer/issues/110 vAdj := resultWindow.GetVAdjustment() vAdj.Connect("value-changed", func() { beenScrolled = true diff --git a/uicomponents.go b/uicomponents.go index ea79909..d5254ab 100644 --- a/uicomponents.go +++ b/uicomponents.go @@ -266,6 +266,7 @@ func flowBoxButton(entry desktopEntry) *gtk.Button { } button.Connect("button-press-event", func() { + // if not scrolled from now on, we will allow launching apps on button-release-event beenScrolled = false })