From 282fb5fc33123f724b853bcd745a7871cd6c34c5 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 14 Aug 2017 23:42:49 -0300 Subject: [PATCH] month-view: don't draw dnd highlight on empty cells https://bugzilla.gnome.org/show_bug.cgi?id=786102 --- src/views/gcal-month-view.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/gcal-month-view.c b/src/views/gcal-month-view.c index 38b8572f..5df47f34 100644 --- a/src/views/gcal-month-view.c +++ b/src/views/gcal-month-view.c @@ -1635,6 +1635,9 @@ gcal_month_view_draw (GtkWidget *widget, gtk_style_context_save (context); gtk_style_context_add_class (context, "offset"); + if (self->dnd_cell != -1) + gtk_drag_unhighlight (widget); + /* Half-cell at the top and bottom */ if (shown_rows == 5) { @@ -1677,6 +1680,9 @@ gcal_month_view_draw (GtkWidget *widget, cell_height + 1); } + if (self->dnd_cell != -1) + gtk_drag_highlight (widget); + gtk_style_context_restore (context); /* grid numbers */ @@ -2287,6 +2293,7 @@ gcal_month_view_init (GcalMonthView *self) cancel_selection (self); + self->dnd_cell = -1; self->pressed_overflow_indicator = -1; self->hovered_overflow_indicator = -1;