aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-day-view.c12
-rw-r--r--calendar/gui/e-week-view-event-item.c10
-rw-r--r--calendar/gui/e-week-view.c4
3 files changed, 22 insertions, 4 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 891c378816..fde159dab1 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1819,6 +1819,9 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
e_day_view_start_selection (day_view, day, -1);
}
} else if (event->button == 3) {
+ if (!GTK_WIDGET_HAS_FOCUS (day_view))
+ gtk_widget_grab_focus (GTK_WIDGET (day_view));
+
e_day_view_on_event_right_click (day_view, event, -1, -1);
}
@@ -1923,6 +1926,9 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
e_day_view_start_selection (day_view, day, row);
}
} else if (event->button == 3) {
+ if (!GTK_WIDGET_HAS_FOCUS (day_view))
+ gtk_widget_grab_focus (GTK_WIDGET (day_view));
+
e_day_view_on_event_right_click (day_view, event, -1, -1);
}
@@ -1950,6 +1956,9 @@ e_day_view_on_long_event_button_press (EDayView *day_view,
return TRUE;
}
} else if (event->button == 3) {
+ if (!GTK_WIDGET_HAS_FOCUS (day_view))
+ gtk_widget_grab_focus (GTK_WIDGET (day_view));
+
e_day_view_on_event_right_click (day_view, event,
E_DAY_VIEW_LONG_EVENT,
event_num);
@@ -1980,6 +1989,9 @@ e_day_view_on_event_button_press (EDayView *day_view,
return TRUE;
}
} else if (event->button == 3) {
+ if (!GTK_WIDGET_HAS_FOCUS (day_view))
+ gtk_widget_grab_focus (GTK_WIDGET (day_view));
+
e_day_view_on_event_right_click (day_view, event,
day, event_num);
return TRUE;
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index c50acabadf..8b4aea1d2d 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -653,11 +653,11 @@ e_week_view_event_item_button_press (EWeekViewEventItem *wveitem,
week_view->pressed_event_num = wveitem->event_num;
week_view->pressed_span_num = wveitem->span_num;
- /* Ignore clicks on the event while editing. */
- if (E_TEXT (span->text_item)->editing)
- return FALSE;
-
if (bevent->button.button == 1) {
+ /* Ignore clicks on the event while editing. */
+ if (E_TEXT (span->text_item)->editing)
+ return FALSE;
+
/* Remember the item clicked and the mouse position,
so we can start a drag if the mouse moves. */
week_view->drag_event_x = bevent->button.x;
@@ -666,6 +666,8 @@ e_week_view_event_item_button_press (EWeekViewEventItem *wveitem,
/* FIXME: Remember the day offset from the start of the event.
*/
} else if (bevent->button.button == 3) {
+ if (!GTK_WIDGET_HAS_FOCUS (week_view))
+ gtk_widget_grab_focus (GTK_WIDGET (week_view));
e_week_view_show_popup_menu (week_view,
(GdkEventButton*) bevent,
wveitem->event_num);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 8eb053e28b..c09d3fc541 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1353,6 +1353,8 @@ e_week_view_on_button_press (GtkWidget *widget,
gtk_widget_queue_draw (week_view->main_canvas);
}
} else if (event->button == 3) {
+ if (!GTK_WIDGET_HAS_FOCUS (week_view))
+ gtk_widget_grab_focus (GTK_WIDGET (week_view));
e_week_view_show_popup_menu (week_view, event, -1);
}
@@ -2227,6 +2229,8 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
return FALSE;
if (event->button.button == 3) {
+ if (!GTK_WIDGET_HAS_FOCUS (week_view))
+ gtk_widget_grab_focus (GTK_WIDGET (week_view));
e_week_view_show_popup_menu (week_view,
(GdkEventButton*) event,
event_num);