add comments #110

This commit is contained in:
piotr 2024-02-06 03:33:12 +01:00
parent 6b39eba14c
commit ec3caa02d2
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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
})