[totem] backend: Fix mouse wheel on volume seeking
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Fix mouse wheel on volume seeking
- Date: Mon, 3 Feb 2014 15:26:11 +0000 (UTC)
commit f0afe3aeb0b2245c6b923e495b1344e9e279ff45
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 3 16:23:39 2014 +0100
backend: Fix mouse wheel on volume seeking
The scroll event should have been captured by the volume widget
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=723323
src/backend/bacon-video-widget.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index c777f4b..bbe8eae 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -804,6 +804,23 @@ bail:
return res;
}
+static gboolean
+bacon_video_widget_scroll (GtkWidget *widget, GdkEventScroll *event)
+{
+ BaconVideoWidget *bvw = BACON_VIDEO_WIDGET (widget);
+ int x, y;
+
+ g_return_val_if_fail (bvw->priv->play != NULL, FALSE);
+
+ translate_coords (widget, event->window, event->x, event->y, &x, &y);
+ if (ignore_event (bvw, x, y))
+ return TRUE;
+
+ if (GTK_WIDGET_CLASS (parent_class)->scroll_event)
+ return GTK_WIDGET_CLASS (parent_class)->scroll_event (widget, event);
+ return FALSE;
+}
+
static void
bacon_video_widget_get_preferred_width (GtkWidget *widget,
gint *minimum,
@@ -870,6 +887,7 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
widget_class->motion_notify_event = bacon_video_widget_motion_notify;
widget_class->button_press_event = bacon_video_widget_button_press_or_release;
widget_class->button_release_event = bacon_video_widget_button_press_or_release;
+ widget_class->scroll_event = bacon_video_widget_scroll;
/* GObject */
object_class->set_property = bacon_video_widget_set_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]