[gnome-calendar] event-widget: propagate scrolling event
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] event-widget: propagate scrolling event
- Date: Sat, 1 Oct 2016 22:17:13 +0000 (UTC)
commit 55b21874a77602eadf0dc88ddb7ce83afcf05a44
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Oct 1 18:32:24 2016 -0300
event-widget: propagate scrolling event
When the event widget's GdkWindow receives an event scroll,
the event is lost because it doesn't handle it. It should,
however, propagate the scroll event so that the container
is able to properly parse it.
Fix that by making GcalEventWidget listen and propagate
scrolled events.
src/gcal-event-widget.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-event-widget.c b/src/gcal-event-widget.c
index 31ef63c..6b889c6 100644
--- a/src/gcal-event-widget.c
+++ b/src/gcal-event-widget.c
@@ -366,7 +366,9 @@ gcal_event_widget_realize (GtkWidget *widget)
GDK_POINTER_MOTION_HINT_MASK |
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK);
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_SMOOTH_SCROLL_MASK |
+ GDK_SCROLL_MASK);
attributes_mask = GDK_WA_X | GDK_WA_Y;
self->event_window = gdk_window_new (parent_window,
@@ -638,6 +640,13 @@ gcal_event_widget_drag_begin (GtkWidget *widget,
gtk_drag_set_icon_pixbuf (context, self->dnd_pixbuf, 0, 0);
}
+static gboolean
+gcal_event_widget_scroll_event (GtkWidget *widget,
+ GdkEventScroll *scroll_event)
+{
+ return GDK_EVENT_PROPAGATE;
+}
+
static void
gcal_event_widget_class_init(GcalEventWidgetClass *klass)
{
@@ -661,6 +670,7 @@ gcal_event_widget_class_init(GcalEventWidgetClass *klass)
widget_class->button_press_event = gcal_event_widget_button_press_event;
widget_class->button_release_event = gcal_event_widget_button_release_event;
widget_class->drag_begin = gcal_event_widget_drag_begin;
+ widget_class->scroll_event = gcal_event_widget_scroll_event;
/**
* GcalEventWidget::date-end:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]