mirror of
https://github.com/nwg-piotr/nwg-drawer.git
synced 2024-08-16 09:10:21 +03:00
add comments #110
This commit is contained in:
parent
6b39eba14c
commit
ec3caa02d2
3
main.go
3
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
|
||||
|
@ -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
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user