aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-day-view.c3
-rw-r--r--calendar/gui/e-week-view.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 49ed340dc5..89cacdd655 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -2866,7 +2866,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
return TRUE;
}
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
+ if (!GTK_WIDGET_HAS_FOCUS (day_view) && !GTK_WIDGET_HAS_FOCUS (day_view->main_canvas))
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE,
@@ -2874,6 +2874,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
| GDK_BUTTON_RELEASE_MASK,
FALSE, NULL, event->time) == 0) {
e_day_view_start_selection (day_view, day, row);
+ g_signal_emit_by_name (day_view, "selected_time_changed");
}
} else if (event->button == 3) {
if (!GTK_WIDGET_HAS_FOCUS (day_view))
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 27d9eb28c8..bd22b7f61e 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2144,7 +2144,7 @@ e_week_view_on_button_press (GtkWidget *widget,
if (event->button == 1) {
/* Start the selection drag. */
- if (!GTK_WIDGET_HAS_FOCUS (week_view))
+ if (!GTK_WIDGET_HAS_FOCUS (week_view) && !GTK_WIDGET_HAS_FOCUS (week_view->main_canvas))
gtk_widget_grab_focus (GTK_WIDGET (week_view));
if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE,
@@ -2154,6 +2154,7 @@ e_week_view_on_button_press (GtkWidget *widget,
week_view->selection_start_day = day;
week_view->selection_end_day = day;
week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_END;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
/* FIXME: Optimise? */
gtk_widget_queue_draw (week_view->main_canvas);