[gnome-music] albumsview: Add TOUCH_MASK event
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] albumsview: Add TOUCH_MASK event
- Date: Sun, 3 Sep 2017 14:13:49 +0000 (UTC)
commit 31e890efc3c90f542dbfa9650bb3650ca7b287a4
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Sun Sep 3 13:28:54 2017 +0200
albumsview: Add TOUCH_MASK event
Adding TOUCH_MASK to events box fixes album scrolling on wayland. It is
now possible to start scrolling on album covers without entering the
selected album.
https://bugzilla.gnome.org/show_bug.cgi?id=780548
gnomemusic/views/albumsview.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index 74e314b..96e7156 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -23,7 +23,7 @@
# delete this exception statement from your version.
from gettext import gettext as _
-from gi.repository import GLib, GObject, Gtk
+from gi.repository import GLib, GObject, Gtk, Gdk
from gnomemusic import log
from gnomemusic.albumartcache import ArtSize
@@ -176,6 +176,8 @@ class AlbumsView(BaseView):
child.image.set_property("width-request", ArtSize.medium.width)
child.image.set_property("height-request", ArtSize.medium.height)
+ child.events.add_events(Gdk.EventMask.TOUCH_MASK)
+
child.events.connect('button-release-event',
self._on_album_event_triggered,
child)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]