add comments #110
This commit is contained in:
3
main.go
3
main.go
@@ -519,6 +519,9 @@ func main() {
|
|||||||
resultWindow.SetEvents(int(gdk.ALL_EVENTS_MASK))
|
resultWindow.SetEvents(int(gdk.ALL_EVENTS_MASK))
|
||||||
resultWindow.SetPolicy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
|
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 := resultWindow.GetVAdjustment()
|
||||||
vAdj.Connect("value-changed", func() {
|
vAdj.Connect("value-changed", func() {
|
||||||
beenScrolled = true
|
beenScrolled = true
|
||||||
|
|||||||
@@ -266,6 +266,7 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
button.Connect("button-press-event", func() {
|
button.Connect("button-press-event", func() {
|
||||||
|
// if not scrolled from now on, we will allow launching apps on button-release-event
|
||||||
beenScrolled = false
|
beenScrolled = false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user